Programming - C++ Language
You Are Here :: Home > C++ Language > Arrays - General Questions
1. |
An array name is a _____
|
A. |
subscript |
B.
|
formal parameter |
C.
|
memory address
|
D.
|
prototype
|
|
Answer: Option C
Explanation:
|
2. |
Which of the following correctly declares an array?
|
A. |
int array[10]; |
B.
|
int array; |
C.
|
array{10};
|
D.
|
array array[10];
|
|
Answer: Option A
Explanation:
|
3. |
What is the index number of the last element of an array with 9 elements?
|
A. |
9 |
B.
|
8 |
C.
|
0
|
D.
|
Programmer-defined
|
|
Answer: Option B
Explanation:
|
4. |
What is a array?
|
A. |
An array is a series of elements of the same type in contiguous memory locations |
B.
|
An array is a series of element |
C.
|
An array is a series of elements of the same type placed in non-contiguous memory locations
|
D.
|
None of the mentioned
|
|
Answer: Option A
Explanation:
|
5. |
Which of the following accesses the seventh element stored in array?
|
A. |
array[6]; |
B.
|
array[7]; |
C.
|
array(7);
|
D.
|
array;
|
|
Answer: Option A
Explanation:
|
6. |
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;
|
|
Answer: Option A
Explanation:
|
next »