填空题
在一个容量为32的循环队列中,若头指针front=3,尾指针rear=2,则该循环队列中共有______个元素。
【参考答案】
31
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下列程序的执行结果是( )。 #include<iostream.h> #include<stdlib.h> Class TestClass public: int x,y; TestClass()x=y=0; TestClass(int a,int b)x=a;y=b; void disp() cout<< x= <<x<< ,y= <<y<<end1; ; void main() TestClass s1(2,3); s1.disp();
A.x=2,y=2
B.x=3,y=3
C.x=2,y=3
D.x=3,y=2
点击查看答案&解析
单项选择题
下列程序的输出结果是( )。 #include<iostream> using namespace std; int main() char a[]= Hello,Test ; char *p=a; while(*p) if(*p>=’a’&&*p<=’z’) cout<<char(*p+’A’-’a’); else cout<<*p; p++; return 0;
A.hello,test
B.Hello,Test
C.HELLO,TEST
D.hELLO,tEST
点击查看答案&解析
相关试题
定义一个函数名为fun,返回值为int,没有参...
如果表达式x=y*z中的“*”是作为成员函...
重新定义标识符的作用域规定是外层变量被隐...
执行下列程序的输出结果是______: ...
动态多态性通过______实现。