更多“以下程序运行后的输出结果是()。 include<stdio.h> main() { int x=20; printf("%d", 0<x<20);”相关的问题
第1题
以下程序运行后的输出结果是 #include <stdio.h> main() {int a[5]={1,2,3,4,5},b[5]={0,2,1,3,0},i,s=0; for(i=1;i<3;i++) s="s+a[b[i]];" printf(“%d”,s);}> A、6
点击查看答案
第2题
以下程序的运行结果是()。 #include <stdio.h> int main() { int p=30; printf("%d\n",p/3>0?p/10:p%3); return 0; }
点击查看答案
第3题
下面程序的运算结果为( ) #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); }
点击查看答案
第4题
以下程序输出的结果是( ). #include <stdio.h> int main() { int a=2,b=3,c=4; a*=16+b++-c; printf("%d\n",a); return 0; }
点击查看答案
第5题
下面程序的输出是( ) 。 #include <stdio.h> int main() { int a= 5; printf("a=%d\n",++a+2); return 0; }
点击查看答案
第6题
以下程序的输出结果是 。 #include <stdio.h> main() { int x=0,a=0,b=0; switch(x){ case 0: b++; case 1: a++; case 2: a++;b++;} printf(“a=%d,b=%d\n”,a,b); }
A、a=2,b=1
B、a=1,b=1
C、a=1,b=0
D、a=2,b=2
点击查看答案
第7题
以下程序运行后输出的结果是________。 #include <stdio.h> main() { int a=1,b=0; printf("%d,",b=a+b); printf("%d",a=2*b); }
点击查看答案
第8题
以下程序的运行结果是_______。 #include <stdio.h> int main( ) { int a=2,b=3,c; c=a; if(a>b)c=1; else if(a==b) c=0; else c=-1; printf("%d\n",c); }
点击查看答案
第9题
如下程序的运行结果是()。 #include <stdio.h> int main() { int a = 10, y = 0; do { a += 2; y += a; if(y > 50) break; }while(a < 14); printf(“a=%d,y=%d\n”, a, y); }
A、a=14,y=26
B、a=16,y=42
C、a=12,y=12
D、a=12,y=26
点击查看答案
第10题
以下程序 #include <stdio.h> main() { int a = -2, b = 0; while (a++ && ++b) ; printf("%d,%d\n", a, b ); } 程序运行后输出结果是 (难度系数★★)
点击查看答案