fgetcとfputc
#include <stdio.h> int main(){ FILE *fp; char c; fp = fopen("test.txt", "r"); while( (c = fgetc(fp)) != EOF){ /*printf("%c", c);*/ fputc(c, stdout); } fclose(fp); return 0; }
#include <stdio.h> int main(){ FILE *fp; char c; fp = fopen("test.txt", "r"); while( (c = fgetc(fp)) != EOF){ /*printf("%c", c);*/ fputc(c, stdout); } fclose(fp); return 0; }