#include "LinkedListStack.h" int main() { int i = 0; int Count = 0; Node* Popped; LinkedListStack* Stack; LLS_CreateStack(&Stack); char a[] = "AAA"; char b[] = "BBB"; char c[] = "CCC"; char d[] = "DDD"; LLS_Push(Stack, LLS_CreateNode(a)); LLS_Push(Stack, LLS_CreateNode(b)); LLS_Push(Stack, LLS_CreateNode(c)); LLS_Push(Stack, LLS_CreateNode(d)); Count = LLS_GetSize(Stack); printf("Size: %d, Top: %s\n\n", Count, LLS_Top(Stack)->Data); for (i = 0; i < Count; i++) { if (LLS_IsEmpty(Stack)) break; Popped = LLS_Pop(Stack); printf("Popped: %s, ", Popped->Data); LLS_DestroyNode(Popped); if (!LLS_IsEmpty(Stack)) { printf("Current Top: %s\n", LLS_Top(Stack)->Data); } else { printf("Stack Is Empty.\n"); } LLS_DestroyStack(Stack); } }