Advertisement
aaronvan

main.c

Aug 29th, 2020
1,436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. /* main.c */
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6. #include "stack.h"
  7.  
  8. int main(int argc, char *argv[]) {
  9.      stack *stk = NULL;
  10.      push(7, &stk);
  11.      push(2, &stk);
  12.      push(9, &stk);
  13.      push(12, &stk);
  14.      push(88, &stk);
  15.      printf("%d\n", pop(&stk));
  16.      printf("%d\n", pop(&stk));
  17.      printf("%d\n", pop(&stk));
  18.      printf("%d\n", pop(&stk));
  19.      printf("%d\n", pop(&stk));
  20.      return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement