Advertisement
Guest User

Untitled

a guest
May 24th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <stdlib.h>
  4.  
  5. FILE *zw;
  6.  
  7. main()
  8. {
  9.  
  10. char zp;
  11.  
  12.  
  13. zw=fopen("c:\\Pulpit\\Programo\\macierz1.txt","r");
  14.  
  15. if(zw==NULL)
  16. printf("plik jest pusty, lub nie istnieje");
  17.  
  18. while(zp!=EOF)
  19. {
  20. zp=fgetc(zw); // czytanie z pliku
  21.  
  22.  
  23. printf("%c",zp);
  24. }
  25.  
  26. fclose(zw);
  27.  
  28.  
  29.  
  30. getch();
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement