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
main () {int a=1,b=2; while (a<6) {b+=a; a+=2; b%=10;} printf(“%d,%d\n”,a,b); } the output of the program is ( )
A. 5,11
B. 7,1
C. 7,11
D. 6,1
If there are the following program segments, where s, a, b, c are defined as integer variables, and a and c are assigned values (c is greater than 0) . s=a; for (b=1;b<=c;b++) s=s+1; Then the assignment statement equivalent to the function of the above program segment is ( ).
A. s=a+b;
B. s=a+c;
C. s=s+c;
D. s=b+c;