若变量都已正确说明,则以下程序段输出为()。int a=1,b=2,c=3;if(a>b) a=b; b=c;c=a;printf(“a=%d b=%d c=%d”,a,b,c)
A. a=1 b=2 c=1
B. a=1 b=2 c=3
C. a=1 b=3 c=1
D. a=2 b=3 c=2
查看答案
共用体类型变量在任何时刻()
A. 所有成员一直驻留在内存中
B. 只有一个成员驻留现在内存中
C. 部分成员驻留在内存中
D. 没有成员驻留在内存中
设有枚举类型定义:enum color={red=3,yellow,blue=10,white,black};其中枚举量black的值是()
A. 7
B. 15
C. 14
D. 12
以下程序的输出结果是()。int main(){ int i=0, j=0, k=6; if ((i>0)||(j>0)) k++; printf(“%d, %d, %d”, i, j, k); return 0;}
A. 0, 0, 6
B. 1, 0, 7
C. 1, 1, 7
D. 0, 1, 7
写出下面程序输出结果()。int main(){ int x=1, y=0, a=0, b=0; switch(x) { case 1: switch(y) { case 0: a++; case 1: b++; } case 2: a++; b++; } printf(“a=%d, b=%d”, a, b) ; return0;}
A. a=2, b=1
B. a=1, b=1
C. a=1, b=0
D. a=2, b=2