{y+=x;printf("y=%d\n",y);}
else
{y=x;printf("y=%d",y);}
}
A)y=41 B)y=43 C)y=42 D)y=1
49、运行下面程序时,从键盘输入"12,34,9",则输出结果是___A___.
#include
void main()
{int x,y,z;
scanf("%d,%d,%d",&x,&y,&z);
if(x
if(y
else printf("%d\n",y);
else if(x
else printf("%d\n",x);
}
A)34 B)12 C)9 D)不确定的值
50、运行下面程序时,从键盘输入字母H,则输出结果是_____C___.
#include
void main()
{char ch;
ch=getchar();
switch(ch)
{case'H':printf("Hello!\n");
case'G':printf("Good morning!\n");
default:printf("Bye_Bye!\n");
}
}
A)Hello!B)Hello!
Good Morning!
C)Hello!D)Hello!
Good morning!Bye_Bye!
Bye_Bye!
51、执行下列程序段后的输出结果是_____A____.
int x=1,y=1,z=1;
x+=y+=z;
printf("%d\n",x
A)3 B)2 C)1 D)4
52、设ch是char型变量,值为'A',则表达式ch=(ch>='A'&&ch<='Z')?ch+32:ch的值是__B___.
A)Z B)a C)z D)A