题目内容

int fun(int x,int y) { if(x==y) return(x); else return((x+y)/2); } main() { int a=4,b=5,c=6; printf("%d\n",fun(2*a,fun(b,c))); } The output of the program is ( )

A. 3
B. 6
C. 8
D. 12

查看答案
更多问题

The following function has been defined: fun (int*p) {return *p;} The return value of this function is ( )

A. Uncertain value
B. Values stored in parameter p
C. The value in the storage unit referred to by parameter p
D. Address value of parameter p

Defined: struct complex{ int real,unreal;} data1={1,8},data2; The wrong assignment statement is ( )

A. data2=data1;
B. data2={2,6};
C. data2.real=data1.real;
D. data2.real=data1.unreal;

#includeint fun(int (*s)[4],int n, int k) { int m,i; m=s[0][k]; for(i=1;im) m=s[i][k]; return m; } main() { int a[4][4]={{1,2,3,4},{11,12,13,14},{21,22,23,24},{31,32,33,34}}; printf("%d\n",fun(a,4,0)); } The result of the program is ( ).

A. 4
B. 34
C. 31
D. 32

main() { char c1,c2; c1='A'+'8'-'4'; c2='A'+'8'-'5'; printf("%c,%d\n",c1,c2); } It is known that the ASCII code of letter A is 65, and the output of the program is ( )

A. E,68
B. D,69
C. E,D
D. Output has no fixed value

答案查题题库