int x=2, y=5; 则x + y =_____x - y =_____x * y =_____x / y =_____x % y =_____
举一反三
- 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