Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

1.

Find the Frequency of Characters in a String


2. Find the Number of Vowels, Consonants, Digits and White space in a String
3. Reverse a Sentence by Recursion
4. Find the Length of a String
5. Copy a String
6. Remove all Characters in a String except alphabet
8. Check if a given String is Palindrome
9. Find the Largest & Smallest Word in a String
10. Remove all Characters in Second String which are present in First String

Q1. Write a program to print characters at odd position and even position for the given
String?

Q2. Program to merge characters of 2 strings into a single string by taking characters
alternatively.

Q3. Write a program to sort the characters of the string and first alphabet symbols followed
by numeric values.

Q4. Write a program for the following requirement:-

input: a4b3c2
output: aaaabbbcc

Q5. Write a program to perform the following activity


input: a4k3b2
output:aeknbd

Q6. Write a program to remove duplicate characters from the given input string?

input: ABCDABBCDABBBCCCDDEEEF
output: ABCDEF

Q7. Write a program to find the number of occurrences of each character present in the given
String?

input: ABCABCABBCDE
output: A-3,B-4,C-3,D-1,E-1

You might also like