题目内容

有下列程序:
main
{ int x=5;
do
{ printf("%d",X-=4);}
while(!(--x));
} 程序的输出结果是()。

A. 1
B. 2 0
C. 1 -4
D. 死循环

查看答案
更多问题

下列程序输出结果是()。
#include
main
{ char a[]={'a','b','C','d','e','f','\0');
int i,j;
i=sizeof(a);
j=strlen(a);
printf("%d,%d",i,j); }

A. 7,7
B. 7,6
C. 6,6
D. 6,7

在代码中定义了一个子过程:Sub P(a,b)End Sub 下列调用该过程的形式中,正确的是()。

A. P(10,20)
B. Call P
Call P l0,20
D. Call P(10,20)

有以下程序:
main
{ int a=0,b=l0,c=0,d=0;
if(a==1) {b=1;c=2;}
else d=3;
printf("%d,%d,%d,%d\n",a,b,C,d); }
程序输出()。

A. 0,1,2,0
B. 0,0,0,3
C. 1,1,2,0
D. 编译有错

对下述程序的判断中,正确的是()。
#include<stdio.h>
main()
{ char*p,s[256];
p=s ;
while(strcmp(s,"the end"))
{ printf("Input the strin9:");
gets(s);
while(*p)
putchar(*p++);
}}

A. 此程序循环接收字符串并输出,直到接收到字符串“the end”为止
B. 此程序循环接收字符串,接收到字符串“the end”则输出,否则程序终止
C. 此程序循环接收字符串并输出,直到接收字符串“the end”为止,但因为代码有错误,程序不能正常工作
D. 此程序循环接收字符串并将其连接在一起,直到接收字符串“the end”为止,输出连接在一起的字符串

答案查题题库