Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. /*  1  */
  2. void stack_create(struct Stack * s)
  3. {
  4.     s->n = 0;
  5. }
  6.  
  7. /*  2  */
  8. struct Stack * stack_create(int size)
  9. {
  10.     struct Stack *s = malloc(sizeof(struct Stack));
  11.     s->a = malloc(sizeof(int) * size);
  12.     s->n = 0;
  13.     s->size = size;
  14.     return s;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement