设栈ST用顺序存储结构表示,top表示栈顶指针(地址),base表示栈底地址,则栈ST为空的条件是()
A: ST.top-ST.base<;>;0
B: ST.top-ST.base==0
C: ST.top-ST.base<;>;n
D: ST.top-ST.base==n
A: ST.top-ST.base<;>;0
B: ST.top-ST.base==0
C: ST.top-ST.base<;>;n
D: ST.top-ST.base==n
举一反三
- 设栈ST 用顺序存储结构表示,则栈ST 为空的条件是 A: ST.top-ST.base<>0 B: ST.top-ST.base==0 C: ST.top-ST.base<>n D: ST.top-ST.base==n
- 设栈ST 用顺序存储结构表示,则栈ST 为空的条件是 A: ST.top-ST.base<>0 B: ST.top-ST.base==0 C: ST.top-ST.base<>n D: ST.top-ST.base==n
- 假设顺序栈的定义为:typedefstruct{selemtype*base;/*栈底指针*/selemtype*top;/*栈顶指针*/intstacksize;/*当前已分配的存储空间,以元素为单位*/}sqstack;变量st为sqstack型,则栈st为空的判断条件为()。 A: st.base==NULL B: st.top==st.stacksize C: st.top-st.base>=st.stacksize D: st.top==st.base
- 设顺序栈st的栈顶指针top的初始值为-1,栈空间大小为MaxSize,则判定st栈为栈空的条件为()。 A: st. top==-1 B: st. top!==1 C: st. top! =MaxSize D: st. top==MaxSize
- 设顺序栈st的栈顶指针top的初始时为-1,栈空间大小为MaxSize,则判定st栈为栈空的条件为