• 2022-06-12
    int x,y; x=2==3-1; y=-5
  • 1:)0

    内容

    • 0

      已知int x=1,y=2,z=3;以下语句执行后x,y,z的值是( ). if(x>y) z=x; x=y; y=z; A: x=1, y=2, z=3 B: x=2, y=3, z=3 C: x=2, y=3, z=1 D: x=2, y=3, z=2

    • 1

      如下程序的输出是什么? #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

    • 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

    • 3

      若有定义:int x=5,y=3;则表达式(x>2 && y>2)的值为1()

    • 4

      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);}