作业帮 > 综合 > 作业

写出下列程序段的输出结果:(队列中的元素类型QElem Type为char).

来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/12 02:23:13
写出下列程序段的输出结果:(队列中的元素类型QElem Type为char).
void main( ){
Queue Q; Init Queue (Q);
char x=’e’; y=’c’;
EnQueue (Q,’h’); EnQueue (Q,’r’); EnQueue (Q,’y’);
DeQueue (Q,x); EnQueue (Q,x);
DeQueue (Q,x); EnQueue (Q,’a’);
while(!QueueEmpty(Q)){ DeQueue (Q,y);printf(y); };
printf(x);
}
写出下列程序段的输出结果:(队列中的元素类型QElem Type为char).
char.
1.h
2.hr
3.hrc
4.rc
5.rch
6.ch (x='r')
7.cha
8.cha