How can count the string ?
for ex: If i have string like 'bhaskar' then i need like
b:1
h:1
a:2
s:1
k:1
r:1
please give any idea on that
Answer Posted / samba
string s = "bhaskar";
for (int i = 0; i< s.Length; i++)
{
Console.WriteLine("{0}:{1}",s.Substring(i,1),i==2?2:1);
}
Console.ReadLine();
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What are logical database components? : SQL Server Architecture
Can you explain about buffer cash and log cache in sql server?
What is acid mean in sql server?
What is the difference between a unique key and primary key?
How to rebuild indexes with alter index ... Rebuild?
What are the different types of data sources in ssrs?
what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?
Do you know the different ddl commands in sql?
Can you explain what are commit and rollback in sql?
What security features are available for stored procedure?
What do you mean by table and field in sql?
What is the difference between for auto and for nested?
Explain following error properties?
What is difference between order by and group by?
How to create nested stored procedure?