3
Answers

Count character from string.

Ask a question
Hi,
I want to write the program How to count the repeted character from the string and print each charater count value.
 
Ex. I have
  string str="asfsdfyagfdvgbf";
 
and i want to output in the below format.
 
 a=2
 s=2
 f=4
 d=2  ...  and so on.
 
 
Thanks 

Answers (3)