填空题

假设用一个长度为50的数组(数组元素的下标从0~49)作为栈的存储空间,栈底指针bottom指向栈底元素,栈顶指针top指向栈顶元素,如果bottom=49,top=30(数组下标),则栈中具有______个元素。

【参考答案】

T
<上一题 目录 下一题>
热门 试题

单项选择题
如下程序运行时的输出结果是 #include<iostream> using namespace std; class ONE int c; public: ONE( ):c(0)eout<<1; ONE(int n):C(n)cout<<2; ; class TW0 ONE onel; ONE one2; public: TWO(int m):one2(m)eout<<3; ; int main( ) TWO t(4); return 0;
A.3
B.23
C.123
D.213
单项选择题
有如下类定义: class XX int xx; public: XX( ):xx(0)eout<<’A’; XX(int n):xx(n)tout<<’B’; ; class YY:public XX mt yy; public: YY( ):yy(0)i cout<<yy; YY(int n):XX(n+1),yy(n)cout<<yy; YY(int m,int n):XX(in),yy(n)cout<<yy; ; 下列选项中,输出结果为A0的语句是
A.YY y1(0,0);
B.YY y2(1);
C.YY y3(0);
D.YY y4;
相关试题
  • 补充完整下面的模板定义: template<clas...
  • 补充完整下面的类定义: const double P...
  • 补充完整下面的类定义: class XCH char...
  • 有如下程序: #include<iostream> usi...
  • 非成员函数应该声明为类______函数才...