单项选择题
下列程序的输出结果是( )。 #include" iostream" using namespace std; int Max(int a,int b) { if(a > b) else return a; else retum b; } void main( ) { int m,n; m=10,n=5; int max=Max(m,n); cout < < max < < end1; }
A.单项索引文件
B.复合索引文件
C.结构化复合索引文件
D.非结构化复合索引文件
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序:#include struct STU{char name[10];int num;};void f(char *name, int num){ struct STU s[2]={{ SunDan ,20044},{ Penghua ,20045}};num=s[0].num;strcpy(name,s[0].name);}main(){ struct STU s[2]={{ YangSan ,20041},{ LiSiGao ,20042}},*p;p=&s[1]; f(p->name,p->num);printf( %s %d n ,p->name,p->num);}程序运行后的输出结果是______。
A.SunDan 20042
B.SunDan 20044
C.LiSiGuo 20042
D.YangSan 20041
点击查看答案&解析
单项选择题
下面程序的结果是( )。#include<iostream.h>class test{ private:int num;public:test( );int getint( ) {return num;}~test( );};test::test( ){ num=0;}test::~test( ){ cout<< Destructor is active <<endl;}void main( ){ test x[3];cout<< Exiting main <<endl;}
A. Exiting main Destructor is active Destructor is active Destructor is active
B. Exiting main Destructor is active Destructoris active
C. Exiting main Destructoris active
D.Exiting main
点击查看答案&解析
相关试题
下列程序在构造函数和析构函数中申请和释放...
C++语言中表示双精度浮点数的关键字是【...
以下程序运行后的输出结果是 ______...
对长度为10的线性表进行冒泡排序,最坏情...
以下程序的功能是输入任意整数给 n 后,...