Advertisement
sp1d3o

main

Feb 25th, 2022
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.70 KB | None | 0 0
  1. #include "Test_set.h"
  2. #include "Sort_code.h"
  3. #include "List_library.h"
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7.     list_t *list = init_empty();
  8.  
  9.     add_end(list, 5);
  10.     add_end(list, 4);
  11.     add_end(list, 8);
  12.     add_end(list, 1);
  13.     add_end(list, 10);
  14.     add_end(list, 2);
  15.     add_end(list, 6);
  16.     add_end(list, 9);
  17.     add_end(list, 0);
  18.     add_end(list, 7);
  19.     add_end(list, 3);
  20.  
  21.  
  22.     int template[11] = {0,1,2,3,4,5,6,7,8,9,10};
  23.  
  24.     printf("First print\n");
  25.     print_list(list);
  26.  
  27.     printf("\n\n\n");
  28.  
  29.     bubble_sort(list);
  30.  
  31.     printf("Print sorted\n");
  32.     print_list(list);
  33.  
  34.     printf("\n\n\n");
  35.  
  36.     printf("Print test\n");
  37.     return(!test(list, template,11));
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement