#include<stdio.h>
#include<errno.h>
#include<string.h>
//fputc fgetc fputs fgets fprintf fscanf fwrite fread fseek ftell rewind
//typedef struct stu
//{
// char name[20];
// int age;
// float garde;
//}stu;
//int main()
//{
//
// stu s = {"瓜皮",22,88.5};
// FILE* pf = fopen("text.txt", "w");
// if (pf == NULL)
// {
// printf("%s", strerror(errno));//perror("");
// return 0;
// }
// /*fputc('b', pf);
// int i = fgetc(pf);*/
// char buf[1024] = { 0 };
// /*fgets(buf, 1024, stdin);
// fputs(buf, stdout);*/
// fprintf(stdout, "%s %d %f\n",s.name,s.age,s.garde);
// fscanf(stdin,"%s %d %f",s.name,&(s.age),&(s.garde));
// fwrite(&s,sizeof(stu),1,pf);
// fread(&s,sizeof(stu),1,pf);
// fseek(pf,2,SEEK_CUR);
// ftell(pf);
// rewind(pf);
// printf("%s", s.name);
// fclose(pf);
// pf = NULL;
// return 0;
//}