Search Header Logo

Викторина по C++

Authored by Нурлыбай Узакбаев

Computers

8th Grade

7 Questions

Used 3+ times

Викторина по C++
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какой из следующих вариантов является правильным объявлением одномерного массива целых чисел в C++?

A) `int array[10];`

B) `array int[10];`

C) `int[10] array;`

D) `int array(10);`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какой оператор используется для доступа к элементам массива в C++?

A) `[]`

B) `{}`

C) `()`

D) `<>`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какой из следующих вариантов правильно инициализирует массив из 5 элементов?

A) `int arr = {1, 2, 3, 4, 5};`

B) `int arr[5] = {1, 2, 3, 4, 5};`

C) `int arr(5) = {1, 2, 3, 4, 5};`

D) `int arr[5] = 1, 2, 3, 4, 5;`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какой из следующих циклов правильно проходит по всем элементам массива `int arr[5]`?

A) `for(int i = 0; i <= 5; i++)`

B) `for(int i = 0; i < 5; i++)`

C) `for(int i = 1; i < 5; i++)`

D) `for(int i = 0; i < 6; i++)`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какой из следующих вариантов кода правильно присваивает значение 10 первому элементу массива `int arr[5];`?

A) `arr[0] = 10;`

B) `arr(0) = 10;`

C) `arr[1] = 10;`

D) `arr[5] = 10;`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какой из следующих массивов будет иметь размер 0?

A) `int arr[0];`

B) `int arr[1];`

C) `int arr[10];`

D) `int arr[-1];`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Какой из следующих массивов будет иметь 10 элементов, если он объявлен как `int arr[10];`?

A) `arr[0]` до `arr[9]`

B) `arr[1]` до `arr[10]`

C) `arr[0]` до `arr[10]`

D) `arr[1]` до `arr[9]`

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Computers