Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- char a,str[100];
- int i,c=0;
- gets(str);
- scanf("%c", &a);
- for(i=0;str[i]!='\0';i++)
- {
- if(a==str[i])
- {
- c++;
- }
- }
- printf("Frequency of the inputed character=%d\n", c);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment