有以下程序 #include main() {int a=1,b=2; while(a<6){b+=a;a+=2;b%二10;} printf(”%d,%d\n”,a,b); } 程序运行后的输出结果是()
A.5,11 B.7,1 C.7,11 D.6,1
单项选择题若有定义语句int a, b;double x;则下列选项中没有错误的是()
A. switch(x%2) {cage 0:a++;break; case 1:b++;break; default:a++;b++; } B. switch((int)x/2.0) {ease 0:a++;break; case 1:b++;break; default:a++;b++; } C. switch((int)x%2) {case 0:a++;break; case 1:b++;break; default:a++;b++; } D. switch((int)(x)%2) {case 0.0:a++;break; case 1.0:b++;break; default:a++;b++; }
单项选择题有以下程序 #include main() {int a=1,b=0; if(!a) b++; else if(a==0)if(a)b+=2; else b+=3; printf(”%d\n”,b); } 程序运行后的输出结果是()
A.0 B.1 C.2 D.3
单项选择题若变量已正确定义,在if (W)printf(“%d n,k”);中,以下不可替代W的是
单项选择题表达式a+=a-=a=9的值是
单项选择题以下选项中能表示合法常量的是
单项选择题有以下定义:int a; long b; double x,y;则以下选项中正确的表达式是()
A.a%(int)(x-y)B.a=x!=y;C.(a*y)%bD.y=x+y=x
单项选择题以下叙述中错误的是
单项选择题以下关于简单程序设计的步骤和顺序的说法中正确的是
单项选择题以下关于结构化程序设计的叙述中正确的是
单项选择题有三个关系R、S和T如下: 则由关系R和S得到关系T的操作是()
A.自然连接 B.交 C.投影 D.并