Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4.  
  5. int foo(char *judge, char *contestant)
  6. {
  7. int c, d;
  8. FILE *f=fopen(judge,"r");
  9. FILE *f2=fopen(contestant,"r");
  10.  
  11. while((c=fgetc(f)) != EOF && (d=fgetc(f2)) != EOF)
  12. {
  13. if(c != d)
  14. return 0;
  15. }
  16. return 1;
  17. }
  18.  
  19. /*#include <stdio.h>
  20. #include <stdlib.h>
  21.  
  22. int main()
  23. {
  24. puts(foo("judge.txt", "contestant.txt") ? "YES" : "NO");
  25. return EXIT_SUCCESS;
  26. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement