更多“下列程序的输出结果为 __________ 。 #inclu…”相关的问题
第1题
以下程序输出的结果是( ). #include <stdio.h> int main() { int a=2,b=3,c=4; a*=16+b++-c; printf("%d\n",a); return 0; }
点击查看答案
第2题
以下程序的输出结果是_____。 #include <stdio.h> main() {int i=1; switch(i) { default: printf("%d",++i); case 0: printf("%d",i++); case 2: printf("%d",++i); } }
点击查看答案
第3题
下面程序的输出结果是 。 #include <stdio.h> void main() { int m=0,n=0; while(m<5) m++; n++; printf("m="%d,n=%d\n",m,n);">
点击查看答案
第4题
运行下面程序后,输出是____. #include <stdio.h> void main( ) { int k=-3; if (k<=0) printf("****\n"); else printf("####\n") }> A、####
B、****
C、####****
D、有语法错误不能通过编译
点击查看答案
第5题
下面程序的运算结果为( ) #include <stdio.h> void swap(int *px, int *py); void swap(int *px, int *py) { int t; t=*px; *px=*py; *py=t; } void main() { int a=3,b=5; swap(&a,&b); print(“%d,%d\n”,a, b); }
点击查看答案
第6题
以下程序的运行结果是()。 #include <stdio.h> int main() { int p=30; printf("%d\n",p/3>0?p/10:p%3); return 0; }
点击查看答案
第7题
下列程序的执行结果是( ). #include <stdio.h> int main( ) { int x=0,y=2,z=1; if (x=z=y) x=3; printf("%d,%d\n",x,z); return 0; }
点击查看答案
第8题
以下程序运行后输出的结果是________。 #include <stdio.h> main() { int a=1,b=0; printf("%d,",b=a+b); printf("%d",a=2*b); }
点击查看答案
第9题
有以下程序:
include<stdio.h>
main()
{ int a;
scanf("%d",&a);
if(a++<9)printf("%d\n",a);
clsc printf("%d\n",a--);
}
程序运行时从键盘输入9<回车>,则输出结果是()。
A.10
B.11
C.9
D.8
点击查看答案
第10题
1. 阅读并分析程序 #include <stdio.h> int main() { char c1,c2; c1=’a’; c2=’b’; printf(“c1 is %c\nc2 is %c\n”,c1,c2); printf(“c1 is %d\nc2 is %d\n”,c1,c2); return 0; } l 请问,程序的运行结果是 。 l 请增加一条语句,用十六进制格式输出c1和c2的数值。 请增加:使c1的值加3,c2的值减1,并重新输出c1和c2的数值。
点击查看答案