mirror of
https://github.com/riba2534/TCP-IP-NetworkNote.git
synced 2026-02-03 01:53:19 +08:00
19 lines
318 B
C
19 lines
318 B
C
#include <stdio.h>
|
|
#define BUF_SZIE 3
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
FILE *fp1;
|
|
FILE *fp2;
|
|
char buf[BUF_SZIE];
|
|
|
|
fp1 = fopen("news.txt", "r");
|
|
fp2 = fopen("cpy.txt", "w");
|
|
|
|
while (fgets(buf, BUF_SZIE, fp1) != NULL)
|
|
fputs(buf, fp2);
|
|
fclose(fp1);
|
|
fclose(fp2);
|
|
return 0;
|
|
}
|