单项选择题
对下列程序段的描述正确的是( )。 #include<iostream.h> int fun(int,int); void main() { cout<<fun(1,2)<<endl; } int fun(int x,int y) { return x+y; }
A.该函数定义正确,但函数调用方式错误
B.该函数调用方式正确,但函数定义错误
C.该函数定义和调用方式都正确
D.该函数定义和调用方式都错误
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下列说法中错误的是( )。
A.公有继承时基类中的public成员在派生类中仍是public成员
B.私有继承时基类中的protected成员在派生类中仍是protected成员
C.私有继承时基类中的public成员在派生类中仍是private成员
D.保护继承时基类中的public成员在派生类中仍是protected成员
点击查看答案&解析
单项选择题
下列程序的输出结果是( )。 #include<iostream> using namespace std; int main() { char a[]= Hello,Test ; char *p=a; while(*p) { if(*p>='a'&&*p<='z') cout<<char(*p+'A'-'a'); else cout<<*p; p++; } return 0; }
A.hello,test
B.Hello,Test
C.HELLO,TEST
D.hELLO,tEST
点击查看答案&解析
相关试题
如果表达式x=y*z中的“*”是作为成员函...
定义一个函数名为fun,返回值为int,没有参...
重新定义标识符的作用域规定是外层变量被隐...
执行下列程序的输出结果是______:#...
如果不使用多态机制,那么通过基类的指针虽...