填空题
已知序列17,18,60,40,7,32,73,65,85,采用冒泡排序法对该序列作降序排序时,第4趟的结果是
【1】
。
【参考答案】
60, 40, 73, 65, 85, 32, 18, 17, 7
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序: #include 〈iostream〉 #include 〈string〉 using namespace std; class visited private: int number; char *name; public: static int glob; void set mes(char *
A.
;
void visited::set mes(char *a)
name=new char[strlen(A) +1];
strcpy(name,A) ;
number=++glob;
int visited::glob-O;
int main()
visited person[10];
int i;
char str[8];
for(i=0;i<5;i++)
cin>>str;
person[i] .set mes(str);
cout<
 
点击查看答案&解析
单项选择题
有如下程序: #include 〈iostream〉 using namespace std; class Base private: char c; public: Base(char n) :c(n) ~Base ( ) cout〈〈c; ; class Derived : public Base private: char c; public: Derived(char n) :Base(n+1),c(n) ~Derived () cout〈〈c; ; int main ( ) Derived obj (’x’); return 0; 执行上面的程序将输出( )。
A.xy
B.yx
C.x
D.y
点击查看答案&解析
相关试题
以下程序实现栈的入栈和出栈的操作。其中有...
若有以下程序: #include〈iostream〉 u...
在下面的程序的横线处填上适当的语句,使该...
非成员函数只有在声明为类的 【10】 才...
cout是I/O流库预定义的 【12】 。