This commit is contained in:
2025-09-15 21:12:04 +08:00
commit 3f58f483ff
144 changed files with 5298 additions and 0 deletions

17
test/file.c Normal file
View File

@@ -0,0 +1,17 @@
#include <stdio.h>
#include <string.h>
int main(){
FILE *fp = fopen("example.txt","r+");
if(fp == NULL){
printf("error,cannot open file");
return 1;
}
char buffer[100];
fread(buffer,sizeof(char),100,fp);
printf("%s\n",buffer);
char *wt = "hello, World1!";
fwrite(wt,sizeof(char),strlen(wt),fp);
fclose(fp);
}