请教一下此程序文件打开问什么会出错啊?
#include<stdio.h>#include<stdlib.h>
main()
{
char ch;
int i,k=0,j=0,j1=0;
FILE *fp;
if((fp=("K:\\f1.txt","w"))==NULL)
{
printf("open error!\n");
exit(0);
}
for(i=0;i<=9;i++)
{
ch=getchar();
fputc(ch,fp);
}
if(fclose(fp))
{
printf("close error!\n");
exit(0);
}
if((fp=("K:\\f1.txt","r"))==NULL)
{
printf("open error!\n");
exit(0);
}
for(i=0;i<=9;i++)
{
ch=fgetc(fp);
if(ch>='0'&&ch<='9')
k++;
else if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
j++;
else
j1++;
fputc(ch,fp);
}
printf("%2d%2d%2d",k,j,j1);
if(fclose(fp))
{
printf("close error!\n");
exit(0);
}
getch();
}