执行下列程序段的结果是() int x=3,y=4; printf("x=%d,y=%d",3*x,2*y);
A: 3,4
B: x=3,y=4
C: x=9,y=8
D: 9,8
A: 3,4
B: x=3,y=4
C: x=9,y=8
D: 9,8
C
举一反三
- 应用Matlab软件计算行列式[img=110x88]17da5d7b00219d6.png[/img]为( ). A: x^2 - 6*x^2*y^2 + 8*x*y^3 - 3*y^4 B: x^3 - 6*x^2*y^2 + 8*x*y^3 - 3*y^4 C: x^4 - 6*x^2*y^2 + 8*x*y^3 - 3*y^4 D: x^5- 6*x^2*y^2 + 8*x*y^3 - 3*y^4
- 如下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
- 以下程序的输出结果是( )。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
- 执行以下语句的结果为______。 int x=3,y;int*px=&x;y=*px++; A: x=3,y=4 B: x=3,y=3 C: x=4,y=4 D: x=3,y不知
- int main()执行结果是(){int x=2,y=1; switch(x) { case 1: y=x ; break; case 2: y=-x ; case 3: y=x*3 ; break; case 4: y=4*x; } printf(“%d\n”,y);}
内容
- 0
【9.4】下列程序段的输出结果是。 void fun(int *x, int *y) {printf("%d%d",*x,*y); *x=3; *y=4;} main() {int x=1,y=2; fun(&y, &x); printf("%d%d",x,y); }
- 1
1、main(){ int x=2,y;switch(x){ case 1: y=x ; break;case 2: y=-x ;case 3: y=x*3 ; break;case 4: y=4*x;}printf(“%d\n”,y);}程序运行结果:__________________
- 2
有以下程序void f( int y,int *x){y=y+*x; *x=*x+y;}main( ){ int x=2,y=4; f(y,&x); printf(“%d %d ”,x,y);} 执行后输出的结果是 A: 8 4 B: 4 2 C: 2 4 D: 4 8
- 3
执行下列程序段后,b、x、y的值是( )。int x=3, y=4;boolean b;b =x<y || ++x == --y; A: true、3、4 B: true、4、3 C: false、3、4 D: false、4、3
- 4
int x,y,z; x=7; y=8; z=9; if(x>y) x=y; y=z; z=x; printf(“x=%d y=%d z=%d\n”,x,y,z);以上程序段的输出结果是:() A: x=7 y=8 z=9 B: x=7 y=9 z=7 C: x=8 y=9 z=7 D: x=8 y=9 z=8