事业单位考试计算机基础知识:链栈的出栈运算
/*链栈的出栈运算 */linkstack *POP_LSTACK(top, datap)
linkstack *top ; datatype *datap;
{ linkstack *p;
if (top==NULL)
{ printf(“栈空!”); return(NULL); }
else { *datap=top->data;
p=top;
top=top->next;
free(p);
return(top)
}
}/* POP_LSTACK */
页:
[1]