Advertisement
Guest User

Test.c

a guest
Aug 7th, 2010
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.69 KB | None | 0 0
  1. # include<stdio.h>
  2. # include "Set.c"
  3.  
  4. int main(){
  5.   Set* s1;
  6.   Set_Create(s1);
  7.  
  8.   Set_Insert(s1, 11);
  9.   Set_Insert(s1, 17);
  10.   Set_Insert(s1, 19);
  11.   Set_Insert(s1, 1);
  12.   Set_Insert(s1, 13);
  13.   Set_Insert(s1, 25);
  14.  
  15.   Set_Delete(s1, 11); //.. Doesn't work
  16.   Set_Print(s1);
  17.  
  18.   if(Set_Contains(s1, 11) == TRUE){
  19.       printf("Contains\n");
  20.   }
  21.   else {
  22.       printf("Does not contains\n");
  23.   }
  24.   Set_Print(s1);
  25.   Set_Clear(s1);
  26.  
  27.   Set* s2;
  28.   Set_Create(s2); //.. Here error comes..
  29.  
  30.   Set_Insert(s2, 4);
  31.   Set_Insert(s2, 7);
  32.   Set_Insert(s2, 15);
  33.   Set_Insert(s2, 25);
  34.   Set_Insert(s2, 1);
  35.   Set_Insert(s2, 4);
  36.   Set_Print(s2);
  37.  
  38.   printf("\nEnd of Processing");
  39.   return 0;
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement