
#include <stdio.h>
#include <stdlib.h>
#include "stack.h"

int main() 
{
  STACK s = createStack();
  int i;

  for (i = 0; i < 20; i++) {
    char *cp = (char*) malloc(1);
    *cp = rand() % 26 + 'A';
    push(s, cp);
    printf("%c", *cp);
  }
  printf("\n");


  while (!isEmpty(s)) {
    char *cp = pop(s);
    printf("%c", *cp);
    free(cp);
  }
  printf("\n");

  destroyStack(s);

  return 0;
}


