宏定义为“#definediv(x,y)x/y;”,若语句“printf("div(x,y)=%d\n",div(x+3,y-3));”作宏替换后为()。
A: printf("x/y=%d",(x+3)/(y-3));
B: printf("x/y=%d",x+3/y-3);
C: printf("div(x,y)=%d",x+3/y-3;);
D: printf("x/y=%d",x+3/y-3;);
A: printf("x/y=%d",(x+3)/(y-3));
B: printf("x/y=%d",x+3/y-3);
C: printf("div(x,y)=%d",x+3/y-3;);
D: printf("x/y=%d",x+3/y-3;);
举一反三
- 下列程序段执行结果为 X=5 Y=-6 If Not x>0 Then x=y-3 Else y=x+3 Print x-y:y-x A: A) -3 3 B) 5 -9C) 3 -3 D) -6 5
- 下列程序段执行结果为( )。 x=5 y=-6 If Not x>0 Then x=y-3 Else y=x+3 Print x-y; y-x A: -3 3 B: 5 -9 C: 3 -3 D: -6 5
- 下列程序段的执行结果为 ______。 X=5 Y=-20 If Not X>0 Then X=Y-3 Else Y=X+3 Print X-Y;Y-X A: -3 3 B: 5 -8 C: 3 -3 D: 25 -25
- 如下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
- int x=10,y=3; printf("%d",y=x/y);