写出下列程序段的输出结果(栈的元素类型为char)void main( ){SqStack S;Char x='c', y='k';InitStack(S);Push(S, x); Push(S, 'a'); Push(S, y);Pop(S, x); Push(S, 't'); Push(S, x);Pop(S, x); Push(S, 's');while( !StackEmpty(S) ){ Pop(S,y); cout<
简述以下算法的功能(栈和队列的元素类型均为int)。void Chang(SqQueue &Q){SqStack S;int d;InitStack(S);while ( !QueueEmpty(Q) ){DeQueue (Q, d);Push(S, d);}while( !StackEmpty(S) ){Pop(S, d);EnQueue (Q, d);}}