#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char *string, *tmp;
char *ptr;
int count=0;
int *freq[];
cout<<endl<<"Enter the string(less than 100) \n";
cin.get(string, 100);
strcpy(tmp, string);
for(int i=0; i<strlen(string); i++)
{
strcpy(tmp, string);
for(int j=0; j<strlen(tmp); j++)
{
ptr = strchr(tmp, string[i]);
if (ptr)
{
count++;
tmp[strcspn(tmp, ptr)]=' ';
}
}
cout<<endl<<string[i]<<" \tcomes\t "<<count<<" \ttime in the string";
count=0;
}
getch();
}