#include void main() { int x=10,y=3; printf(“%d\n”,y=x/y); }
C
举一反三
- 以下程序没有语法问题的是() 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 ;}
- 如下C程序的输出是什么?#include [stdio.h]void Func1 (int x, int y);void Func2 (int *x, int *y); int main() { int x = 3; int y = 4;Func1 (x, y); printf ("x = %d, y = %d\n", x, y);Func2(&x, &y); printf ("x = %d, y = %d\n", x, y);} void Func1 (int x, int y) { x = x + y; y = x - y; x = x - y; printf ("x = %d, y = %d\n", x, y);} void Func2 (int *x, int *y) { *x = *x + *y; *y = *x - *y; *x = *x - *y;;} A: x = 3, y = 4x = 3, y = 4x = 3, y = 4 B: x = 4, y = 3x = 4, y = 3x = 4, y = 3 C: x = 3, y = 4x = 3, y = 4x = 4, y = 3 D: x = 4, y = 3x = 3, y = 4x = 4, y = 3
- 以下程序的运行结果是_____________ #include "stdio.h" void main() { void add(int x,int y, int z); int x=2,y=3,z=0; printf("(1)x=%d y=%d z=%d\n",x,y,z); add(x,y,z); printf("(3)x=%d y=%d z=%d\n",x,y,z); } void add(int x,int y, int z) { z=x+y; x=x*x; y=y*y; printf("(2)x=%d y=%d z=%d\n",x,y,z); }
- 以下程序的输出结果是 void main() {int x=10, y=3; printf(“%d”, y=x/y ); }
- 有下列程序,程序运行后的输出结果是( )。 #include void fun( int *x,int *y); int main() { int x=1,y=2; fun(&y,&x); printf("%d %d",x,y); return 0; } void fun( int *x,int *y) { printf("%d%d",*x,*y); *x=3;*y=4; }
内容
- 0
下面程序的输出结果是 。 #include int main (void) { int x=2,y,z; x*=3+2;printf("%d\n",x); x*=y=z=4;printf("%d\n",x); x=y=z;printf("%d\n",x); x=(y=z);printf("%d\n",x); return 0; }
- 1
下面程序的输出结果是________________ #include int x,y; f( ) { int y,a=25,b=10; x=a+b; y=a-b; return; } void main( ) { int a=9,b=5; x=a+b; y=a-b; f( ); printf(“%d,%d\n”,x,y); }
- 2
以下程序的输出结果是( )。main(){ int x=1,y=2; void swap(int x,int y); swap(x,y); printf("x=%d,y=%d\n",x,y);}void swap(int x,int y){ x=3,y=4;} A: x=3,y=4 B: x=1,y=2 C: x=3 y=4 D: x=1 y=2
- 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 main(){ int x=20,y=50; printf(