以下程序没有语法问题的是()
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 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 ;}
举一反三
- 以下程序中,运行结果是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; }
- 若运行时为变量x输入12 则以下程序的运行结果是 include stdio h int main int x y scanf d x y x 12 x 10 x 12 printf d n y return 0 A0B22C12D10
- #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; }
- 【单选题】以下程序的输出结果是()。 #include"stdio.h" int f(int x) { int y; if(x==0||x==1) return (3); y=x*x-f(x-2); return y; } main() { int z; z=f(3); printf("%d ",z); } A. 0 B. 9 C. 6 D. 8
- 若运行以下程序时输入:5<;回车>;,则程序的运行结果是 。#include <;stdio.h>;int main(){int x,y;scanf("%d",&x);if (x>;=0)if (x>;0) y=1;else y=0;else y=-1;printf("x=%d,y=%d\n",x,y);return 0;}