String Programming Questions
String Programming Questions
q1. Write an efficient C function to return maximum occurring character in the input string e.g., if input string is “test string” then function should return ‘t’
q2. Remove all duplicates from the input string.
q3. Write an efficient C program to print all the duplicates and their counts in the input string
q4. Write an efficient C function that takes two strings as arguments and removes the characters from first string which are present in second string (mask string).
q5. Given a string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1 using only one call to strstr routine?
(eg given s1 = ABCD and s2 = CDAB, return true, given s1 = ABCD, and s2 = ACBD , return false)
q6. Write a recursive/non-recursive C function to print reverse of a given string
Executable code. With Complexities.
q2. Remove all duplicates from the input string.
q3. Write an efficient C program to print all the duplicates and their counts in the input string
q4. Write an efficient C function that takes two strings as arguments and removes the characters from first string which are present in second string (mask string).
q5. Given a string s1 and a string s2, write a snippet to say whether s2 is a rotation of s1 using only one call to strstr routine?
(eg given s1 = ABCD and s2 = CDAB, return true, given s1 = ABCD, and s2 = ACBD , return false)
q6. Write a recursive/non-recursive C function to print reverse of a given string
Executable code. With Complexities.
raveena- Posts : 6
Join date : 2015-03-16
Permissions in this forum:
You cannot reply to topics in this forum