Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include "linkedList.h"
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. int main()
  6. {
  7. node* first = (node*)malloc(sizeof(node));
  8. AllocationsCheck(first);
  9. first = NULL;
  10. for (int i = 0; i < 5; i++)
  11. {
  12. list_insert(&first, i);
  13. print_list(first);
  14. }
  15. /*poping*/
  16. for (int i = 0; i < 5; i++)
  17. {
  18. printf("Popping : %d\n\n", first->val);
  19. list_delete(&first);
  20. print_list(first);
  21. }
  22. system("pause");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement