![](https://csdnimg.cn/release/download_crawler_static/86209165/bg4.jpg)
void save()
{
FILE * fp;
int j=0,i;
char ch[2];
int n=0;
printf(”请选择输入方式:\n”);
printf("1:向管理系统重新输入数据,并删除原有数据\n2:向系统增加
数据\n");
scanf("%d",&i);/*输入选项*/
if(i==1)
{
if((fp=fopen(”C:\\file1。dat”,”wb+"))==NULL)/*判断文件能
否打开*/
{
printf(”can not open this file\n");
exit(0);
}
printf("你是否要输入职工信息?(是:y/否:n)”);
scanf("%s”,ch);
while(strcmp(ch,”y")==0||strcmp(ch,”Y”)==0)/*判断是否要
录入新信息*/