写出下面程序的运行结果: #include void main( ) { int a=1,b=0; printf("%d,",b=a+b); printf("%d",a=2*b); }
1,2
举一反三
- 有以下程序:#include main(){ int a=1,b=0; printf(%d,,b=a+b); printf(%d ,a=2*b);}
- 写出下面程序的运行结果是 #include <stdio.h> void main() { int a,b,c=9; a=3,b=4; c%= a+b; printf(“%d”,c) }
- 写出下面程序的运行结果是#include <stdio。h>void main( ){ int a,b,c=9; a=3,b=4; c%= a+b; printf(“%d”,c)}。 A: 3 B: 2 C: 1 D: 4
- 请写出以下程序的运行结果#include int main() { printf(Hello World! ); return 0; }
- 写出下面程序的运行结果: main() { int a,b,c=9; a=3,b=4; c%= a+b; printf(“%d”,c) } A: 3 B: 2 C: 1 D: 4
内容
- 0
写出下面程序的运行结果( )。#include int x=1,y=2;void sub(int y){ x++; y++;}void main(){ int x=2; sub(x); printf("x+y=%d",x+y);} A: x+y=4 B: x+y=5 C: x+y=6 D: x+y=3
- 1
请写出以下程序的输出结果()。void main(){int a=1,b=2,c=3;if(c=a)printf("%d",c);else printf("%d",b);}
- 2
【简答题】写出下面程序运行结果: main() { int a=1,b=10; do { b-=a; a++; }while(b--<0); printf("%d",b); }
- 3
写出下面程序的运行结果: #include main() { int a=4,b,c; c=a+(b=2); a+=a-=a*a; printf("%d,%d,%d",a,b,c); }
- 4
下面程序运行后的输出结果是______。 int a=1,b=0; printf("%d,",b=a+b); printf("%d\n",a=2*b);