单项选择题
对下列程序段的描述正确的是( )。 #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
点击查看答案&解析
相关试题
有下列的程序: #include<cstring.h>...
下列程序的执行结果是( )。 #include...
有如下程序: #include<iostream> usi...
有如下程序: #include<iostream> usi...
有如下程序: #include<iostream.h> ...