更多"有如下头文件: int f1( ); static int f2("的相关试题:
[单项选择]有如下头文件:
int f1( );
static int f2( );
class MA
public:
int f3( );
static int f4( );
;
在所描述的函数中,具有隐含的this指针的是
A. f1
B. f2
C. f3
D. f4
[单项选择]有如下头文件: int f1( ); static int f2( ); class MA{ public: int f3( ); static int f4( ); };在所描述的函数中,具有隐含的this指针的是
A. f1
B. f2
C. f3
D. f4
[单项选择]阅读下面代码 public class Person { static int arr[]=new int[10]; public static void main(String args) { System.out.println(arr[9]); } } 该代码的运行结果是
A. 编译时将产生错误
B. 编译时正确,运行时将产生错误
C. 输出零
D. 输出空
[单项选择]有如下类定义: class Point{ private: static int how_many; }; ______how_many=0; 要初始化Point类的静态成员how_many,在下画线处应填入的内容是
A. int
B. static int
C. int Point::
D. static int Point::
[单项选择]有如下类定义: class Point{ private: static int how_many; }; ______how_many=0; 要初始化Point类的静态成员how_many,下划线处应填入的内容是
A. int
B. static int
C. int Point: :
D. static int Point
[单项选择]下面程序的运行结果为( )。 class A{ static int n; public: A( ){n=1;} A(int num){n=num;} void print( ){cout<<n;} } A::n=0; void main( ){ A a,b(2); a.print( ); b.pint( ); }
A. 12
B. 11
C. 22
D. 21
[单项选择]给出下列的程序,其叙述正确的是public class Man { static int arr[]= new int [10]; public static void main (String a []){ System.out.println(arr[1]); }}
A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null
[单项选择]给出下列的程序,其叙述正确的是( )。public class Man{static int arr[]=new int[10];public static void main(String args[]){System. out. println (arr[1=];}}
A. 编译时将发生错误
B. 编译时正确但是运行时出错
C. 输出为0
D. 输出为null
[单项选择]有如下头文件:
int fl( );
static int f2( );
class MA{
public:
int f3( );
static int f4( );
在所描述的函数中,具有隐含的this指针的是
A. f1
B. f2
C. f3
D. f4
[单项选择]有以下程序
int f1(int x,int y){return x>yx:y;} int f2(int x,int y){return x>yy:x;} main( )
{
int a=4,b=3,c=5,d=2,e,f,g; e=f2(f1(a,b),f1(c,d)); f=f1(f2(a,b),f2(c,d)); g=a+b+c+d-e-f; printf("%d,%d,%d/n",e,f,g);
}
程序运行后的输出结果是______。
A. 4,3,7
B. 3,4,7
C. 5,2,7
D. 2,5,7