题目内容
(请给出正确答案)
[单选题]
请阅读以下程序:#include<stdio.h>main(){ int x=1,y=0,a=0,b=0;switch(x){ case 1:switch(y){ case 0:a++;break; }case 2:a++,b++;break; }printf(" a=%d,b=%d\n",a,b);上面程序的输出结果是
A.a=2,b=1
B.a=1,b=1
C.a=1,b=0
D.a=2,b=2
答案
查看答案
A.a=2,b=1
B.a=1,b=1
C.a=1,b=0
D.a=2,b=2
第2题
A.This
B.This is
C.This is a
D.This is an example.
第3题
A.65536
B.0
C.有语法错误,无输出结果
D.-l
第4题
A.11
B.10
C.9
D.8
第5题
有以下程序#include <stdio.h>main(){ int num=0; while(num <=2) { num++; printf("%d\n",num); }}上面程序的输出结果是
A.1
B.1
2
C.1
2
3
D.1
2
3
4
第7题
以下程序运行后的输出结果是______。
char s[]="\\141\141abc\t";
printf("%d\n",strlen(s));
第8题
A.8
B.2
C.6
D.4
第9题
A.11
B.10
C.9
D.8