67)有以下程序:
#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>
void main()void main()void main()void main()void main()void main()void main()void main()void main()void main()void main()
{int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;int x=1,y=0;
if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;if(!x)y++;
else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)else if(x==0)
if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;if(x)y+=2;
else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;else y+=3;
printf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%dprintf("%d\n",y);n",y);n",y);n",y);n",y);n",y);
}
程序运行后的输出结果是()。
A)3 B3 B3 B)2 C2 C2 C)1 D1 D1 D)0
第1题
66)有以下程序:
#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>#include <stdio.h>
main()main()main()main()main()main()
{while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='while(getchar()!='\n');n');n');n');
}
以下叙述中正确的是
A)此 while 语句将无限循环
B)getchar() 不可以出现在 while while while while while while 语句的条件表达式中
C)当执行此 while 语句时 ,只有按回车键程序才能继续执行
D)当执行此 while 语
第2题
以下程序的运行结果_______。
#include <stdio.h>
void main( )
{
int a[3][4]={2,4,6,8,10,12,14,16,18,20,22,24};
int (*p)[4]=a,i,j,k=0;
for(i=0;i<3;i++)
for(j=0;j<2;j++)
k+=*(*(p+i)+j);
printf("%d \n",k);
}
A、65
B、66
C、67
D、68
第3题
若变量已正确定义并赋值,以下不能构成C语句的选项是( ).
A.A=a+b;
B.B++;
C. A?a:b;
D.a=a+b
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!