Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- int foo(char *judge, char *contestant)
- {
- int c, d;
- FILE *f=fopen(judge,"r");
- FILE *f2=fopen(contestant,"r");
- while((c=fgetc(f)) != EOF && (d=fgetc(f2)) != EOF)
- {
- if(c != d)
- return 0;
- }
- return 1;
- }
- /*#include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- puts(foo("judge.txt", "contestant.txt") ? "YES" : "NO");
- return EXIT_SUCCESS;
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement