admin 管理员组

文章数量: 1087135


2024年3月7日发(作者:active官网)

#include

void main()

{

int num;

char name[5];

FILE *fp;

if ((fp = fopen("", "w")) == NULL)

printf("cannot open file!n");

scanf("%d %s",&num,name);

fprintf(fp, "%d %s", num, name);

fclose(fp);

if ((fp = fopen("", "w")) == NULL)

printf("cannot open file!n");

fwrite(&num, sizeof(int), 1, fp);

fwrite(name, sizeof(char), 5, fp);

fclose(fp);

}


本文标签: 官网 作者