Search Header Logo

C++ Arrays Quiz

Authored by Fidaa Abed

Computers

12th Grade

Used 2+ times

C++ Arrays Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In C++, what does the array name arr typically represent?

A) The first element of the array

B) The last element of the array

C) The memory address of the first element of the array

D) The total number of elements in the array

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How are array elements in C++ indexed?

A) From 1 to the size of the array

B) From 0 to one less than the size of the array

C) From -1 to the size of the array minus two

D) Indexing is not supported in C++ arrays

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an array in C++?

A) A data structure that allows you to store multiple values under a single variable name

B) A function to perform mathematical operations

C) A feature for input and output operations

D) None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to declare an array in C++?

A) int arr[5];

B) int arr();

C) array arr[5];

D) int array 5;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the size of an int array arr[5] in C++, if an integer takes up 4 bytes?

A) 4 bytes

B) 20 bytes

C) 5 bytes

D) 9 bytes

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about arrays in C++ is FALSE?

A) Arrays can store multiple values of the same type

B) Once an array is defined, its size can be changed

C) Array elements are stored in contiguous memory locations

D) The array index must be an integer type

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the last element of an array named arr with 10 elements in C++?

A) arr[10];

B) arr[9];

C) arr[10] - 1;

D) arr;

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?