#include #include typedef struct LinkStack { char data; struct LinkStack *next; } LinkStack; LinkStack *push(LinkStack *top, char a) { LinkStack *line = (LinkStack *)malloc(sizeof(LinkStack)); line->data = a; line->next = top; top = line; return top; } LinkStack *pop(LinkStack *top) { if (top) { LinkStack *p = top; top = top->next; printf("current = %c \n", p->data); if (top) { printf("top = %c\n", top->data); } else { printf("empty\n"); } free(p); } else { printf("Stack Empty\n"); return top; } return top; }