Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2. #define N 80
  3.  
  4. using namespace std;
  5.  
  6. int main () {
  7. FILE *filec;
  8. FILE *filer;
  9. int size;
  10. filec = fopen("f.txt", "r");
  11. fseek (filec, 0, SEEK_END);
  12. size = ftell (filec);
  13. fclose(filec);
  14. char arr[size];
  15. filer = fopen("f.txt", "r");
  16. while (fgets (arr, size, filer) != NULL)
  17. fclose(filer);
  18. printf("%s", arr);
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement