问题 问答题

写出下列程序段的输出结果。(假设此栈中元素的类型是char)
voide main( )
stack s;
char x,y;
InitStack(s)
x=‘1’,y=‘0’
push(s,x);
push(s,x);
push(s,y);
push(s,x);
push(s,‘e’);
push(s,x);
pop(s,x);
push(s,‘h’);
while(!stackEmpty(s))
pop(s,y);
printf(y);

prinft(x)

答案

参考答案:此题的输出结果是hello。

填空题
问答题 论述题