Friday, July 31, 2009

Can anyone write c/c++ program for this string based problem??

Q.1 To take a string from the User %26amp; then arrange the characters in that string in ascending order like if user enters "babcac" the program should print it as "aabbcc"





Q.2 Occurrence of letters in String. Get string from user of any length %26amp; print letters coming maximum time first than second largest….. i.e in descending order.


The requirement is that this program should be made through linked list . Must allocate memory dynamically. pls Use proper assumptions %26amp; add Comments everywhere .





Output look like if u enter string aababbbcba


b 5 times


a 4 times


c 1 times just like that

Can anyone write c/c++ program for this string based problem??
Yes, anyone having decent knowledge of c/c++ can write such a program. Rather anyone knowing basics of programming and having a c/c++ reference write such a program. The only one who can not write such a program is one who does not want to write it.


No comments:

Post a Comment