Как объявить одномерный массив в C++?

Основы одномерных массивов в C++

Quiz
•
Information Technology (IT)
•
8th Grade
•
Hard
Нурай Сердалыкызы
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
int myArray[10];
float myArray[10];
int myArray = new int[10];
int[] myArray;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Как правильно объявить массив из 10 целых чисел?
int arr(10);
int arr[10];
int arr = new int[10];
array<int> arr(10);
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Как инициализировать массив целых чисел в C++?
int arr[] = {1, 2, 3, 4, 5};
int arr(5) = {1, 2, 3, 4, 5};
int arr[5] = new int[5]{1, 2, 3, 4, 5};
int arr = {1, 2, 3, 4, 5};
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Найди ошибку в этом коде:
int arr[5];
for (int i = 1; i <= 5; i++) {
cin >> arr[i]; }
Неверный тип данных
Индекс массива начинается с 1
Цикл считывает только положительные элементы
Ошибок нет
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Как проверить, является ли число четным в массиве?
Число / 2 == 1
Число + 2 == 0
Число % 2 != 0
Используйте условие: число % 2 == 0.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Как проверить, является ли число нечетным в массиве?
Используйте условие: число % 2 == 0.
Проверьте, если число делится на 3.
Используйте условие: число < 0.
Используйте условие: число % 2 != 0.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Как изменить значение элемента массива?
Используйте синтаксис arr[index] = новое_значение;
Замените элемент массива с помощью функции map;
Удалите элемент массива и добавьте новый с помощью метода splice;
Используйте метод push для изменения значения элемента массива;
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Вопросы по Python

Quiz
•
8th Grade
13 questions
Тест «Основные алгоритмические конструкции»

Quiz
•
8th Grade
10 questions
Операторы ввода-вывода в программировании

Quiz
•
8th Grade
10 questions
8 клас Типи даних у програмуванні. Введення й виведення даних. В

Quiz
•
8th Grade
10 questions
МЦКО

Quiz
•
8th Grade - University
10 questions
Логические операции ОГЭ

Quiz
•
8th Grade
8 questions
Ветвление

Quiz
•
1st Grade - University
10 questions
питончки

Quiz
•
8th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
10 questions
Identify Slope and y-intercept (from equation)

Quiz
•
8th - 9th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
15 questions
Volume Prisms, Cylinders, Cones & Spheres

Quiz
•
8th Grade
26 questions
June 19th

Quiz
•
4th - 9th Grade
25 questions
Argumentative Writing & Informational Text Vocabulary Review

Quiz
•
8th Grade
18 questions
Informational Text Vocabulary

Quiz
•
7th - 8th Grade