Choose the correct statements
A. | Strictly speaking C supports 1-dimensional arrays only |
B. | An array element may be an array by itself |
C. | Array elements need not occupy contiguous memory locations |
D. | Both (a) and (b) |
Answer : D Explanation : C supports 1-dimensional arrays only. But, the array element can be an array by itself. Using this, one can simulate multi-dimensional arrays. Though at the user level, we use 2-dimen-sional arrays, the compiler interprets this as a 1-dimensional array, each of whose element is a 1-dimensional array. As a matter of fact, a declaration like char [3] [4] , will be interpreted as a 1-dimensional array of size 3 (rather than 4)—each element being a character array of length 4. |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |