Sign in

gwj / po_oopc · Files

GitLab

  • Go to dashboard
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • po_oopc
  • examples01-en
  • 07-stackc
  • teststack.c
  • Reformatted code
    c0b14c54
    Grzegorz Jabłoński authored
    2022-09-16 14:36:36 +0200  
    Browse Code »
teststack.c 355 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include "stack.h"
#include <stdio.h>

int main()
{
    struct stack_handle s1;
    struct stack_handle s2;
    init(&s1);
    init(&s2);
    push(&s1, 1);
    push(&s1, 2);
    push(&s1, 3);
    push(&s2, 5);
    push(&s2, 6);
    printf("%d %d\n", pop(&s1), pop(&s2));
    printf("%d\n", pop(&s1));
    finalize(&s1);
    finalize(&s2);
    return 0;
}