Arrays can be declared either within or outside a function.
查看答案
Which declares an array of three rows and four columns?
A. int val[3,4];
B. int val[4,3];
C. int val[3][4];
D. int val[4][3];
The outer braces in the initialization statement of a two-dimensional array can be omitted.
Which is a correct statement?
A. int grades[5] = {98, 87, 92, 79, 85};
B. int grades[5] = 98, 87, 92, 79, 85;
C. int grades[5] = (98, 87, 92, 79, 85);
D. int grades[5] = [98, 87, 92, 79, 85];
If an array has been declared as consisting of 10 elements and you use an index of 12, C will notify you of the error when the program is compiled.