i have made a program with this algorithm but its not working properly my code is given below can you help me to remove the errors
#include<stdio.h>
#include<conio.h>
void main()
{
FILE *f;
char ch;
int nalpha=0,nword=0,nno=0,nsc=0;
f=fopen("abc.txt","r");
if(f!='NULL')
{
while(ch=getch(f)!=EOF)
{
printf("%c",ch);
if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
nalpha++;
else if((ch==' ')||(ch=='.'))
nword++;
else if(ch>='0'&&ch<='9')
nno=nno+1;
else
nsc++;
}
}
printf("no.of alphabets is %d",nalpha);
printf("no.of words is %d",nword);
printf("no.of numbers is %d",nno);
printf("no.of other characters is %d",nsc);
fclose(f);
getch();
}