Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdbool.h>
- #include "stack1a.h"
- //#include "stack1a.c"
- int main( int argc, char const *argv[])
- {
- Stack*s1 = init(5);
- int counter;
- for(counter = 1; counter < 25; counter++)
- {
- push(s1, counter);
- if(counter%5 == 0)
- {
- printf("Size of the stack is: %d\n", s1->size);
- }
- }
- while(s1->top != -1)
- {
- printf("%d ", pop(s1));
- }
- destroy (s1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement