printf("Please input three ip:\n");
for (i=0;i<3;i++)
scanf("%s",&new[i]);
if ((fp=fopen("c:\\turboc2\\net.cfg","w"))==NULL)
{printf("cannot open this file\n");exit(0);}
for (i=0;i<3;i++)
{
strcat(tmp[i],new[i]);
fputs(tmp[i],fp);
fputc('\n',fp);
}
fclose(fp);