举一反三
- 以下程序没有语法问题的是() A: B: include<;stdio.h>;int main( ){int x , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} C: D: include<;stdio.h>;int main( ){int x = 3 ;y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;} E: F: include<;stdio.h>;int main( ){int x = 3 ,y ; printf( "%d\n" , x / y ) ;y = 5; return 0 ;} G: H: include<;stdio.h>;int main( ){int x = 3 , y = 5 ; printf( "%d\n" , x / y ) ; return 0 ;}
- 以下程序正确的是_____ A: B: include<;stdio.h>;int gNum;gNum=13;void main(){printf("%d\n", gNum);} C: D: include<;stdio.h>;void main(){int rob=17;printf("rob=%d\n", rop);}int rop=71; E: F: include<;stdio.h>;void main(){extern int outer;printf("outer=%d\n", outer);}int outer=33; G: H: include<;stdio.h>;void main(){extern int outer=33;printf("outer=%d\n", outer);}int outer=33;
- #include void main() { int x=10,y=3; printf(“%d\n”,y=x/y); }
- 以下程序的运行结果是( )。#include <;stdio.h>;void fun(int x){ if(x/2>;0) fun(x/2-2);printf("%d ",x);}int main(){fun(20);return 0;}
- Which of the following program is right? A: include <stdio.h> int main(); { /*programming*/ printf("programming!\n"); return 0; } B: include <stdio.h> int main() { /*programming*/ printf("programming!\n"); return 0; } C: include <stdio.h> void main() { /*programming*/ printf("programming!\n") return 0; } D: include <stdio.h> int mian() { /*programming*/ printf("programming!\n"); return 0; }
内容
- 0
下面程序的运行结果是a=____,b=____。#include<;stdio.h>;int main( ){void f( int x , int y ) ;int a = 1 , b = 2 ;f( a , b ) ;printf( "a=%d,b=%d\n" , a , b ) ;return 0 ;}void f( int x , int y ){x = 100 ;y = 200 ;}
- 1
有以下程序 #include <stdio.h> int main(){ int x=1,y=2,z=3; if(x>y) if(y<z) printf("%d",++z); else printf("%d",++y); printf("%d ", x++ ); }
- 2
以下程序中,运行结果是36的有()。 A: include <stdio.h> B: define M(y) y*y int main() { printf("%d\n",M(6+0)); return 0; } C: include <stdio.h> D: define M(y) (y)*(y) int main() { printf("%d\n",M(6+0)); return 0; } E: include <stdio.h> int M(int y) { return y*y; } int main() { printf("%d\n",M(6+0)); return 0; } F: include <stdio.h> int M(int y) { return (y)*(y); } int main() { printf("%d\n",M(6+0)); return 0; }
- 3
#include [stdio.h] int x,y; int f(int x){ y=x++; printf("%d",y); } int main(void){ int x=5; f(x); f(x); return 0; }
- 4
下列程序的输出结果是()。#include<;stdio.h>;void f(int x,int y,int z){z=x+y;}void main(){int a;f(5,6,a);printf("%d\n",a);} A: 12 B: 11 C: 1 D: 不确定