• 2021-04-14
    #includestatic int x=5;void f1...4=%d ,x); return 0;}
  • x1=3 x2=6 x3=1 x4=3

    举一反三

    内容

    • 0

      Given: Which five methods, inserted independently at line 5, will compile?() A: public int blipvert(int x) { return 0; } B: private int blipvert(int x) { return 0; } C: private int blipvert(long x) { return 0; } D: protected long blipvert(int x) { return 0; } E: protected int blipvert(long x) { return 0; } F: protected long blipvert(long x) { return 0; }

    • 1

      下面的函数定义,( )是正确的。 A: void f() { ...... } B: void f() { ...... return 0; } C: int f(); { ...... } D: double f(int x;int y) { ...... }

    • 2

      #include int cude( );int main( ){ int x=5;x=cude( );printf("%d\n",x);return 0;}int cude( ){ int x;x=x*x*x; return x;} A: 5 B: 125 C: 0 D: 1

    • 3

      下面程序的输出结果是_______。 #include void increment(void); int main(void) { increment(); increment(); increment(); return 0; } void increment(void) { int x = 0; x += 1; printf("%d ", x); }

    • 4

      下面程序的运行结果是a=____,b=____。#include<;stdio.h>;int main( ){void f( int x , int y ) ;int a = 1 , b = 2 ;f( a , b ) ;printf( "a=%d,b=%d\n" , a , b ) ;return 0 ;}void f( int x , int y ){x = 100 ;y = 200 ;}