C Arrays Questions and Answers
C Arrays questions with answers are among the most frequently asked topics in C programming questions and answers for technical interviews. Arrays form the backbone of data storage and manipulation in C language. By mastering array declaration, initialization, and traversal, you build a strong base for coding efficiency. Companies like TCS, Wipro, and Cognizant often test candidates with C array MCQs to assess logical implementation and memory handling. This section includes solved examples, explanations, and C array programs to help students achieve accuracy and confidence in placement tests.
C Arrays
Showing 10 of
50 questions
11. Identify the correct declaration.
- int a [10] [10];
- int a [10, 10];
- int a (10) (10);
- int a (10, 10);
12. Maxmimum number of elements in tha array declaration int x [10]; is
- 9
- 10
- 11
- undefined
13. The elements of the following array x are float x[5];
- x[0], x[1], x[2], x[3], x[4]
- x[1], x[2], x[3], x[4], x[5]
- x(0), x(1), x(2), x(3), x(4)
- x(1), x(2), x(3), x(4), x(5)
15. Two dimensional array elements are stored
- column major order
- row major order
- both options a and b
- random order
16. Two-dimensional array elements are stored in
- column major order
- row major order
- both options a and b
- random order
17. ANSI C recommends a compiler to support at least _______dimensions of an array.
- 4
- 5
- 6
- 7
18. Array declaration
- requires the number of elements to be specified
- does not require the number of elements to be specified
- assumes default size as 0
- is not necessary
20. What is the value of a [0][2] in int a[3][4] = {{1,2}, {4,8,15}} ?
- 4
- 2
- 0
- not defined