更多“有以下程序 #include <stdio.h>”相关的问题
第1题
以下程序 #include <stdio.h> main() { int a = -2, b = 0; while (a++ && ++b) ; printf("%d,%d\n", a, b ); } 程序运行后输出结果是 (难度系数★★)
点击查看答案
第2题
有以下程序 #include <stdio.h> main() { int a=2, c=5; printf( "a=%%d,b=%%d\n", a,c ); } 程序的输出结果是( )
A、a=2,b=5
B、a=%2,b=%5
C、a=%d,b=%d
D、a=%%d,b=%%d
点击查看答案
第3题
#include <stdio.h> int main() { int a,b,c; a=10; b=23; c=a+b; printf("a+b="); printf("%d\n",c); return 0; } 该程序的运行结果是
点击查看答案
第4题
#include <stdio.h> main() { int a = 3; do { printf("%d,", a-=2 ); } while( ! (--a) ); printf("\n"); } 程序运行后的输出结果是 (难度系数★★★)
点击查看答案
第5题
有以下程序 #include(stdio.h> main() {int a=l;b=2; for(;a<8;a++) {b+="a;a+=2;}" printf("%d,%d\n",a,b); }> A、9,18
点击查看答案
第6题
有以下程序
#include
main()
{ int a=7;
while(a--);
printf("%d\n",a);
}
程序运行后的输出结果是
A.-1
B.0
C.1
D.7
点击查看答案
第7题
有以下程序: #include <stdio.h> . main() {int al=0,a2=0,a3=0; char ch; while((ch=getchar())!='\n') switch(ch) {case 'A':a1++; case 'B':a2++; default:a3++; } printf("%d,%d,%d",a1,a2,a3);} 现从键盘上输入AAAAABBBC <回车> ,则程序执行后的输出结果是( )
A、5,8,9
B、5,3,1
C、5,3,9
D、5,8,1
点击查看答案
第8题
有以下程序 #include <stdio.h> int main() {int a=1,b=2,c=3,d=0; if(a==1) if(b!=2) if(c==3) d=1; else d=2; else if(c!=3) d=3; else d=4; else d=5; printf("%d\n",d); } 程序运行后的输出结果是 。
点击查看答案
第9题
有以下程序 #include <stdio.h> main() { int a=5,b=1,t; t=(a<<2|b); printf("%d\n",t); }> A、21
点击查看答案
第10题
有以下程序: #include<stdio.h> int main() { int n=2,k=0; while(k++&&n++>2); printf("%d%d\n",k,n); return 0; }
点击查看答案