Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- char sz[123];
- ////////////////////////////////////////////////////
- int main() //
- {
- FILE *fp;
- fp = fopen("sony.txt", "r");
- if(fp == 0) { printf("Error file open\n"); return 0; }
- fscanf(fp, "%s", sz);
- printf(sz);
- if(fp != 0) fclose(fp);
- }
- /*
- ////////////////////////////////////////////////////
- int main() //
- {
- FILE *fp;
- fp = fopen("sony.txt", "w");
- if(fp == 0) { printf("Error file open\n"); return 0; }
- fprintf(fp, "Hello, World!\n End of file....");
- if(fp != 0) fclose(fp);
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement