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
void fun (char *a,char *b) {a=b; (*a)++; } main() { char c1='A', c2='a', *p1, *p2; p1=&c1; p2=&c2; fun (p1,p2); printf("%c%c\n", c1,c2); } The output of the program is ( ).
Ab
B. aa
C. Aa
D. Bb
double a[10],*s=a; What can represent array element a [3] is ( ).
A. (*s)[3]
B. *(s+3)
C. *s[3]
D. *s+3
void fun(int p) { int d=2; p=d++; printf("%d",p); } main() { int a=1; fun(a); printf("%d\n",a); } The output of the program is ( )
A. 32
B. 12
C. 21
D. 22