当前位置:计算机科学技术题库>CPP考试题库

问题:

[单选] 1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout >a>>b; 10)c=max(a,b); 11)cout

A.input two numbers:\n。B.input two numbers:。C.cout<<”input two numbers:\n”。D.”please input two numbers:\n”。

问题:

[单选] 1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout >a>>b; 10)c=max(a,b); 11)cout

A、input two number:前面。B、input two number:后面。C、input two number:下一行首列。D、不确定。

问题:

[单选] 1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout >a>>b; 10)c=max(a,b); 11)cout

A、2。B、2.0(小数位数由编译器决定)。C、3。D、3.0(小数位数由编译器决定)。

问题:

[单选] 1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout >a>>b; 10)c=max(a,b); 11)cout

A、变量定义。B、函数调用。C、函数声明。D、函数定义。

问题:

[单选] 1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout >a>>b; 10)c=max(a,b); 11)cout

A.0。随机值。8。8.0(小数位数由编译器决定)。

问题:

[单选] 1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout << " input two numbers: "; 9)cin>>a>>b; 10)c=max(a,b); 11)cout<< " the squart of max imum="<< sqrt(c); 12)} 13)double max(doublex,doubley) 14){ 15)if(x>y) 16)returnx; 17)else 18)returny; 19)}若执行第9行时,输入89后按回车,则执行完第19行后,max函数的返回值是:()

A.8。8.0(小数位数由编译器决定)。9。9.0(小数位数由编译器决定)。

问题:

[单选] 1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout >a>>b; 10)c=max(a,b); 11)cout

A.0。1。2。3。

问题:

[单选] 1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout >a>>b; 10)c=max(a,b); 11)cout

A、2,5。B、2.0,5.0(小数位数由编译器决定)。C、不确定,不确定。D、x,y变量不存在。

问题:

[单选] 1)#include < iostream > 2)#include < cmath > 3)using namespace std; 4)double max(double x,doubley) 5){ 6)if(x>y) 7)return x; 8)else 9)return y; 10)} 11)int main() 12){ 13)doublea,b,c; 14)cout <<" input two numbers: "; 15)cin >> a >> b; 16)c=max(a,b); 17)cout <<" the squart of max imum="<< sqrt( c ); 18)}程序在第16行调用max()函数时,系统是否为第4行中的x,y分配存储空间:()

A.x不分配,y不分配。x分配,y不分配。x不分配,y分配。x分配,y分配。

问题:

[单选] 1)#include < iostream > 2)#include < cmath > 3)using namespace std; 4)double max(double x,doubley) 5){ 6)if(x>y) 7)return x; 8)else 9)return y; 10)} 11)int main() 12){ 13)doublea,b,c; 14)cout <<" input two numbers: "; 15)cin >> a >> b; 16)c=max(a,b); 17)cout <<" the squart of max imum="<< sqrt( c ); 18)}执行第15行时,若输入“8空格9回车”,则第4行中,y的值是:()

A.0。随机值。9。9.0000000000000000。