#include<stdio.h>
int main()
{
char str2[30],ch;
int i,count=0;
printf("Enter the string: ");
gets(str2);
printf("\nEnter character from string that you want to find: ");
scanf("%c",&ch);
for(i=0;str2[i]!='\0';i++)
{
if(ch==str2[i])
{
count++;
}
}
printf("\n'%c' Occurs '%d' Times",ch,count);
return 0;
}