Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main(void)
- {
- FILE *written;
- written=fopen("student.txt","w");
- fprintf(written,"資管系");
- fclose(written);
- FILE *read;
- read=fopen("student.txt","r");
- char string[100];
- while (fgets (string, 65535,read)) //65535 緩衝
- {
- printf("%s\n",string);
- }
- fclose(read);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment