1.从键盘输入ADescruotir,则运行结果是()
#include
main()
{ char c; int v0=1,v1=0,v2=0;
do{ switch(c=getchar())
{ case 'a':case 'A':
case 'e':case 'E':
case 'i':case 'I':
case 'o':case 'O':
case 'u':case 'U': v1+=1;
default:v0+=1;v2+=1;}} while(c!='\n');
printf("v0=%d,v1=%d,v2=%d\n",v0,v1,v2);}
2.求运行结果
int x=0,s=0;
while(!x!=0) s+=++x;
printf("%d",s);
3.正确的是()
A. main() B. main() C. main() D. main()
{ int x,y,z; { int x,y,z { int x;int { int x,y,z;
x=0;y=x-1; x=0;y=x+1; int y; x=0;y=x+1;
z=x+y;} z=x+y;} x=0,y=x+1; z=x+y,}
z=x+y;}
4. int a=14,b=15,x;
char c='A';
x=(a&&b)&&(c 则X的值为()
A. true B. false C.0 D.1
5.不正确的是()
A. char a[10]="china"; B. char a[10],*p=a;p="china" C. char *a; a="china"; D. char a[10],*p; p=a="china"
6.
main()
{ char s[]="ABCD",*P;
for(p=s+1;p 则输出结果是()
A. B B. BCD
C CD
D D