题目内容

以下程序运行后,如果从键盘上输人5,则输出结果是:()main( ){int x;scanf("%d",&x);if(x--<5)printf("%d",x);elseprintf("%d",x++);}

A. 3
B. 4
C. 5
D. 6

查看答案
更多问题

y和z都是int类型变量,且x=3,y=4,z=5,则下面的表达式中,值为0的表达式为()。

A. 'x'&&'y'
B. x<=y
C. x||y+z&&y-z
D. !((x

选择出合法的if语句(设int x,a,b,c;)()。

A. if(a=b) c++;
B. if(a=if(a<>b) c++;if(a=>b) c++;

以下程序的运行结果是()。#include ”stdio.h”main(){int a=2,b= -1,c=2;if (a

A. 0
B. 1
C. 2
D. 3

运行以下程序后,如从键盘上输入china#,则输出为()。#include ”stdio.h”main(){int v1=0,v2=0;char ch;while ( (ch=getchar()) != ’# ’)switch (ch){ case ’a’:case ’h’:default: v1++;case ’o’: v2++;}printf(”%d,%d\n”, v1,v2);}

A. 2,0
B. 5,0
C. 5,5
D. 2,5

答案查题题库