题目内容

The constant expressions of each case in the switch statement must have different values.

查看答案
更多问题

The loop body in a loop statement is allowed to contain more than one statement, which can not appear as a compound statement.

It is known that the ASCII code value of letter A is 65. If the variable kk is of char type. The following expression that does not correctly determine that the value of kk is an uppercase letter is ( ).

A. kk>='A' && kk<='Z'
B. !(kk>='A' ‖ kk<='Z')
C. (kk+32)>='a' &&(kk+32)<='z'
D. isalpha(kk)&&(kk<91)

#includemain() { int a=1, b=2; for(;a<8;a++) {b+=a; a+=2; } printf("%d,%d\n",a,b); }The output of the program is ( ).

A. 9,18
B. 8,11
C. 7,11
D. 10,14

The switch statement with different functions from the statement if (a == 1) a = b; else a ++; is ( ).

A. switch(a) { case 1:a=b;break; default : a++; }
B. switch(a==1) { case 0:a=b;break; case 1: a++; }
C. switch(a) { default:a++;break; case 1:a=b; }
D. switch(a) { default:a++;break; case 1:a=b; }

答案查题题库