C Arrays Questions and Answers

Practice Mode
Showing 10 of 50 questions
Q11
Identify the correct declaration.
  • A int a [10] [10];
  • B int a [10, 10];
  • C int a (10) (10);
  • D int a (10, 10);
Answer: Option A
Q12
Maxmimum number of elements in tha array declaration int x [10]; is
  • A 9
  • B 10
  • C 11
  • D undefined
Answer: Option B
Q13
The elements of the following array x are float x[5];
  • A x[0], x[1], x[2], x[3], x[4]
  • B x[1], x[2], x[3], x[4], x[5]
  • C x(0), x(1), x(2), x(3), x(4)
  • D x(1), x(2), x(3), x(4), x(5)
Answer: Option A
Q14
Maximum number of elements in the declaration int y[5][8]; is
  • A 28
  • B 32
  • C 35
  • D 40
Answer: Option D
Q15
Two dimensional array elements are stored
  • A column major order
  • B row major order
  • C both options a and b
  • D random order
Answer: Option B
Q16
Two-dimensional array elements are stored in
  • A column major order
  • B row major order
  • C both options a and b
  • D random order
Answer: Option B
Q17
ANSI C recommends a compiler to support at least _______dimensions of an array.
  • A 4
  • B 5
  • C 6
  • D 7
Answer: Option C
Q18
Array declaration
  • A requires the number of elements to be specified
  • B does not require the number of elements to be specified
  • C assumes default size as 0
  • D is not necessary
Answer: Option A
Q19
Identify the wrong expression given int a[10];
  • A a[-1]
  • B a[10]
  • C a[0]
  • D ++a
Answer: Option D
Q20
What is the value of a [0][2] in int a[3][4] = {{1,2}, {4,8,15}} ?
  • A 4
  • B 2
  • C 0
  • D not defined
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test