The correct initialization statement of one-dimensional array a is ( )
A. int a[10]=(0,0,0,0,0);
B. int a[10]={};
C. int a[]={0};
D. int a[10]={10*1};
查看答案
If there are defined statements: int m[]={5,4,3,2,1},i=4;, the wrong reference to the element of array m is ( )
A. m[--i]
B. m[2*2]
C. m[m[0]]
D. m[m[i]]
The input function that should be used when the user asks for a space in the input string is ( )
A. scanf()
B. getchar()
C. gets()
D. getc()
There is the following function definition: void fun(int n, double x){ …… } If the variables in the following options are defined and assigned correctly, the correct call statement to function fun is ( )
A. fun(int y, double m);
B. k=fun(10,125);
C. fun(x,n);
D. void fun(n,x);
If there is the following definition: int x[10],*pt=x; The correct reference to an element of array x is ( )
A. *&x[10]
B. *(x+3)
C. *(pt+10)
D. pt+3