#include "stdio.h"
#include "stdlib.h"
#define N sizeof(struct stack)
typedef struct stack{
int data;
struct stack *next;
}*pstack;
//置空链栈
pstack empty(pstack top){
top = NULL;
printf("栈已经置空!\n");
return top;
}
//判断栈空
void isempty(pstack top){
if (top == NULL)
printf("链栈为空!\n");
else
printf("链栈不为空!\n");
}
//入链栈
pstack push(pstack top){
#include "stdlib.h"
#define N sizeof(struct stack)
typedef struct stack{
int data;
struct stack *next;
}*pstack;
//置空链栈
pstack empty(pstack top){
top = NULL;
printf("栈已经置空!\n");
return top;
}
//判断栈空
void isempty(pstack top){
if (top == NULL)
printf("链栈为空!\n");
else
printf("链栈不为空!\n");
}
//入链栈
pstack push(pstack top){