有如下程序:#nclude<iostremn>using namespace std

题型:单项选择题

问题:

有如下程序:#nclude<iostremn>using namespace std;class Stack{public:Stack(unsigned n=10:size(n){rep_=new int[size];top=O;}Stack(Stack&s):size(s.size){ rep_=new int[size];for(int i=0;i<size;i++)rep_[i]=s.rep_[i];top=s.top;}~Stack(){delete[]rep_;}void push(int a){rep_[top]=a; top++;}int opo(){--top;return rep_[top];}bool is Empty()const{return top==O;}pavate: int*rep_; unsigned size,top;};int main(){ Stack s1; for(int i=1;i<5;i++) s1.push(i); Stack s2(s1); for(i=1;i<3;i++) cout<<s2.pop()<<’,’; s2.push(6); s1.push(7); while(!s2.isEmpty()) cout<<s2.pop()<<’,’;return 0;} 执行上面程序的输出是

A.4,3,2,1

B.4,3,6,7,2,1

C.4,3,6,2,1

D.1,2,3,4

考点:计算机等级考试C++全国计算机等级考试二级C++真题2005年4月
题型:单项选择题

1.0363636……是循环小数,用简便记法记作(    ),精确到十分位约是(    )。

题型:单项选择题

我国A公司出口一批货物,付款方式为D/P90天。汇票及货运单据通过托收银行寄抵国外代收行后,买方进行了承兑。但货物到达目的地后,恰逢行市上涨,于是买方出具信托收据(T/R)向银行借出单证。货物出售后,买方由于其他原因倒闭,以致卖方不能按时收回货款。但此时距离汇票到期日还有30天。如你是这批出口业务的经办人,应如何处理?并简述理由。

题型:单项选择题

工程咨询服务邀请招标中,被邀请的公司数目通常以( )家左右为宜。

A.3

B.4

C.5

D.6

题型:单项选择题

紫砂壶起源于中国的哪个朝代()

A、宋朝

B、明朝

C、清朝

题型:单项选择题

请根据信息提示判断下列历史人物分别是谁?

更多题库