有以下程序#include <stdio.h>main(){ int x=1, y=2, z=3; if(x>y) if(y<z) printf(
有以下程序#include <stdio.h>main() { int x=1, y=2, z=3; if(x>y) if(y<z) printf("%d", ++z); else printf("%d", ++y); printf("%d\n", x++);}程序的运行结果是A.331 B.41 C.2 D.1
有以下程序#include <stdio.h>main() { int x=1, y=2, z=3; if(x>y) if(y<z) printf("%d", ++z); else printf("%d", ++y); printf("%d\n", x++);}程序的运行结果是A.331 B.41 C.2 D.1
请补充main函数,该函数的功能是:打印届1~1000中满足:个位数字的立方等于其本身所有数。
本题的结果为;1 64 125 216 729
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数main的横线上填入所编写的若干表达式或语句。
试题程序:
include <stdio .h>
main ()
{
int i,g;
clrscr ();
for (i=1; i<1000; i++)
{
g=【 】;
if(【 】)
printf ("%4d", i);
}
}
有以下程序: #include<stdio.b> void fun(char c) { if(c>X)fun(c-1): printf("%C",c); } traia() { fun(z);} 程序运行后的输出结果是()
A.xyz
B.wxyz
C.xzy
D.zvx
有以下程序: #include <stdio.h> main() { int x=3,y=2,z=1; printf("%d\n",x/y&~z); 程序运行后的输出结果是()。
A.3
B.2
C.1
D.0
有以下程序: #include <stdio. h > main() { int m =3,n =4,x; x= -m++; x=x+8/++n; prinff(" % d \n" ,x); } 程序运行后的输出结果是()。
A.3
B.5
C.-1
D.-2
A.-11 is a positive odd number.
B.-11 is a negative odd number.
C.-11 is a positive even number.
D.11 is a negative even number.
有以下程序: #include<stdio.h> #define N 8 void fun(int*x,int i) {*x=*(x+i);) main() { int a[N]={1,2,3,4,5,6,7,8},i; fun(a,2); for(i=0;i<N/2;i++) {printf("Ha",a[i]);} printf("\n"); } 程序运行后的输出结果是()。
A.1313
B.2234
C.3234
D.1234
有以下程序段
#include<stdio.h>
main()
{
while(getchar()!=‘\n’);
}
以下叙述中正确的是
A.此while语句将无限循环
B.getchar()不可以出现在while语句的条件表达式中
C. 当执行此while语句时,只有按回车键程序才能继续执行
D.当执行此while语句时,按任意键程序就能继续执行
A.运行后报错
B.6 6
C.6 11
D.5 10