Update stdcpy.c

应当为fopen
This commit is contained in:
JiuMu3
2024-09-25 21:28:51 +08:00
committed by GitHub
parent 6f26d90ea6
commit a03816979c

View File

@@ -7,8 +7,8 @@ int main(int argc, char *argv[])
FILE *fp2;
char buf[BUF_SZIE];
fp1 = open("news.txt", "r");
fp2 = open("cpy.txt", "w");
fp1 = fopen("news.txt", "r");
fp2 = fopen("cpy.txt", "w");
while (fgets(buf, BUF_SZIE, fp1) != NULL)
fputs(buf, fp2);