The correct one in the following statement groups is ( )
A. char *s;s="Olympic";
B. char s[7];s="Olympic";
C. char *s;s={"Olympic"};
D. char s[7];s={"Olympic"};
查看答案
For initialization of two-dimensional array, initial value can be assigned to the array line by line.
It is not allowed to initial some elements of a two-dimensional array.
The following options that do not define a 2D array correctly are ( )
A. int a[2][2]={{1},{2}};
B. int a[][2]={1,2,3,4};
C. int a[2][2]={{1},2,3};
D. int a[2][]={{1,2},{3,4}};
If there is a definition: int a[2][3];, the correct reference to a array element in the following options is ( ) .
A. a[2][!1]
B. a[2][3]
C. a[0][3]
D. a[1>2][ !1]