C program to find the frequency of characters in a string

Program : - 

#include<stdio.h>
#include<conio.h>
void main()
{
       char c[1000],ch;
       int i,count=0;
       printf("Enter a string: ");
       gets(c);
       printf("Enter a character to find frequency: ");
       scanf("%c",&ch);
       for(i=0;c[i]!='\0';++i)
       {
               if(ch==c[i])
               ++count;
       }
       printf("Frequency of %c = %d", ch, count);
       getch();
}

 

Output : -

Enter a string: This website is awesome.
Enter a character to find frequency: e
Frequency of e = 4