举一反三
- int x,y; x=9%5; y=9/5 则x=,y=。
- int x=4; int y=5; y=x*--y==++x*y?x++:y--; 求x=?,y=
- 已知int x=3,y=4;,写出下列表达式的值 (1) (x,y) (2) x>y?x:y (3) x?y:x (4) (x>y)?(y>=2)?1:2:(y>x)?x:y
- 如下程序的输出是什么? #include <stdio.h> void Swap (int x, int y);int main() { int x = 1; int y = 2; printf ("x=%d,y=%d\n", x, y); Swap (x, y); printf ("x=%d,y=%d", x, y); } void Swap (int x, int y) { int temp; temp = x; x = y; y = temp; printf ("x=%d,y=%d\n", x, y); }? x=1,y=2x=2,y=1x=2,y=1|x=1,y=2x=1,y=2x=2,y=1|x=1,y=2x=2,y=1x=1,y=2|x=1,y=2x=1,y=2x=1,y=2
- 如下程序的输出是什么? #include [stdio.h] void Swap (int x, int y); int main() { int x = 1; int y = 2; printf ("x=%d,y=%d\n", x, y); Swap (x, y); printf ("x=%d,y=%d", x, y); } void Swap (int x, int y) { int temp; temp = x; x = y; y = temp; printf ("x=%d,y=%d\n", x, y); } A: x=1,y=2x=2,y=1x=2,y=1 B: x=1,y=2x=1,y=2x=2,y=1 C: x=1,y=2x=2,y=1x=1,y=2 D: x=1,y=2x=1,y=2x=1,y=2
内容
- 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
- 1
以下程序的输出结果是( )。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
- 2
设\(z = {e^ { { y \over x}}} + {x^y} + {y^x}\),则\({z_x} = \) A: \({1 \over x}{e^ { { y \over x}}} + {x^y}\ln x + x{y^{x - 1}}\) B: \(- {y \over { { x^2}}}{e^ { { y \over x}}} + {x^y}\ln x + x{y^{x - 1}}\) C: \({e^ { { y \over x}}} + y{x^{y - 1}} + {y^x}\ln y\) D: \( - {y \over { { x^2}}}{e^ { { y \over x}}} + y{x^{y - 1}} + {y^x}\ln y\)
- 3
下列语句语法正确的是( ) A: if x<2*y and x>y then y=x**2 B: if x<2*y : x>y then y=x^2 C: if x<2*y and x>y then y=x2 D: if x<2*y and x>y then y=x^2
- 4
int x,y; x=2==3-1; y=-5