更多“下列程序的输出结果是()。 #include<stdio.h> main() { int a=2,b=3,P; p=f(a,b); printf”相关的问题
第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 <iostream> using namespace std; struct country { int num; char name[20]; }x[5]={1, "China", 2, "USA", 3, "France", 4, "England", 5, "Spanish"}; void main() { struct country *p; p=x+2; cout<<p->num<<','<<x[0].name<<endl;>
点击查看答案
第3题
以下程序 #include <stdio.h> main() { int a = -2, b = 0; while (a++ && ++b) ; printf("%d,%d\n", a, b ); } 程序运行后输出结果是 (难度系数★★)
点击查看答案
第4题
有以下程序 #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
点击查看答案
第5题
#include <stdio.h> main() { int a = 3; do { printf("%d,", a-=2 ); } while( ! (--a) ); printf("\n"); } 程序运行后的输出结果是 (难度系数★★★)
点击查看答案
第6题
#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; } 该程序的运行结果是
点击查看答案
第7题
有以下程序
#include
main()
{ int a=7;
while(a--);
printf("%d\n",a);
}
程序运行后的输出结果是
A.-1
B.0
C.1
D.7
点击查看答案
第8题
以下程序的输出结果是_____。 #include <stdio.h> main() {int i=1; switch(i) { default: printf("%d",++i); case 0: printf("%d",i++); case 2: printf("%d",++i); } }
点击查看答案
第9题
以下程序运行后的输出结果是 #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
点击查看答案
第10题
有以下程序 #include <stdio.h> main() { int a=5,b=1,t; t=(a<<2|b); printf("%d\n",t); }> A、21
点击查看答案