单项选择题

如果函数没有返回值,对于函数的返回值说明可以是( )。

A) 可能没有返回值说明
B) 用void说明
C) 用const说明
D) 返回值可以是任意类型
<上一题 目录 下一题>
热门 试题

单项选择题
有如下程序: #include<iostream> using namespaee std; int i=1; class Fun public: static int i; int value( ) return i-1; int value( )cons[ return i+1; ; int Fun::i=2; int main( ) int i=3; Fun funl; const Fun fun2; ______: return 0; 若程序的输出结果是: 123 则程序中下画线处遗漏的语句是
A) cout<<funl.value( )<<Fun::i<<fun2.value( );
B) cout<<Fun::i<<funl.value( )<<fun2.value( );
C) cout<<funl.value( )<<fun2.value( )<<Fun::i;
D) cout<<fun2.value( )<<Fun::i<<funl.value( );
单项选择题
下列程序的运行结果是 #include<iostream.h> class A int a; public: A( )a=0; A(int aa) a=aa; cout<<a++; ; void main( ) A x,y(2),z(3); cout<<end1;
A) 00
B) 23
C) 34
D) 25
相关试题
  • 下面程序的运行结果为( )。 #include...
  • 内部静态变量的作用域是( )。
  • 有以下程序 #include<iostream.h> vo...
  • 下列关于顺序存储结构叙述中错误的是( )。
  • 下面程序的运行结果为( )。 #include...