C++ MCQ Questions - Array

This section focuses on the "Array" in C++ programming langauge. These Multiple Choice Questions (MCQ) should be practiced to improve the C++ programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. _________________ which stores a fixed-size sequential collection of elements of the same type.

A. loop
B. array
C. exception
D. number

View Answer


2. An array is used to store a collection of data.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


3. All arrays consist of __________ memory locations.

A. simple
B. contiguous
C. distant
D. None of the above

View Answer


4. The lowest address of array is?

A. 0
B. 1
C. 2
D. 3

View Answer


5. The arraySize must be an integer constant greater than ?

A. 0
B. 1
C. 2
D. 3

View Answer


6. The number of values between braces { } can not be larger than the number of elements that we declare for the array between square brackets [ ].

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


7. Which of the following correctly declares an array in C++?

A. array{10};
B. array array[10];
C. int array;
D. int array[10];

View Answer


8. What is the index number of the last element of an array with 9 elements?

A. 0
B. 1
C. 8
D. 9

View Answer


9. Which of the following gives the memory address of the first element in array?

A. array[0];
B. Array[1];
C. Array[2];
D. Array[3];

View Answer


10. C++ supports multidimensional arrays.

A. Yes
B. No
C. Can be yes or no
D. Can not say

View Answer





Discussion



* You must be logged in to add comment.