CPP Array MCQ

Cpp MCQ
  1. Home
  2. Tutorials
  3. Cpp
  4. Array
  5. Multiple Choice Question

(1) Which of the following parenthesis are used while initialization of array ?

A) [ ]
B) { }
C) ( )
D) None

(2) Which of the following is last index of array int arr[5]?

A) 5
B) 4
C) 3
D) 2

(3) Which of the following is valid for declaration of float type array of 10 elements?

A) float arr[10];
B) float arr(10);
C) float arr"10";
D) float arr<10>;

(4) int arr[10] will take how many bytes in memory?

A) 20
B) 50
C) 10
D) 100

(5) In two dimensional array first index represent which of the following?

A) Rows
B) Columns
C) Position
D) Address

(6) An array is set of memory locations.

A) Heterogenous
B) Homogeneous
C) Autonomous
D) None

(7) Which of the following parenthesis used to write index and size of array?

A) ()
B) []
C) <>
D) {}

(8) How many type of array are used in C++

A) 1
B) 2
C) 3
D) 4

(9) Array index starts with

A) 0
B) 1
C) 2
D) 4
Comments
Login to TRACK of Comments.