Advertisement
Guest User

1

a guest
Apr 24th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main (void)
  4. {
  5.  
  6. FILE *dat;
  7. int c;
  8. dat = fopen ("prog.c", "r");
  9. if (dat == NULL)
  10. {
  11. printf ("Datoteka se ne moze otvoriti\n");
  12. exit (1);
  13.  
  14. }
  15.  
  16. while ((c = fgetc (dat)) != EOF)
  17. {
  18. putchar (c);
  19.  
  20. }
  21.  
  22. fclose (dat);
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement