|
A linked representation of a stack |
|||||||||||||||||||||
|
#define OK -8888 |
|||||||||||||||||||||
|
top: |
|||||||||||||||||||||
|
|||||||||||||||||||||
|
typedef struct |
|||||||||||||||||||||
|
typedef struct node { |
|||||||||||||||||||||
|
int data; |
|||||||||||||||||||||
|
} Node; |
/* defining Node to be struct |
||||||||||||||||||||
|
void clearstack (Nodeptr |
|||||||||||||||||||||
|
|
|||||||||||||||||||||
|
pop(ptr)); |
|||||||||||||||||||||
|
} |
|||||||||||||||||||||