Lab Assignment#3
Lab Assignment#3
1. String Reversal: Write a program to reverse a given string without using built-in
functions.
o Input: "hello"
o Output: "olleh"
2. Palindrome Check: Check whether a given string is a palindrome.
o Input: "madam"
o Output: True
3. Character Frequency: Count the frequency of each character in a string.
o Input: "apple"
o Output: {'a': 1, 'p': 2, 'l': 1, 'e': 1}
4. Substring Search: Find whether a given substring exists in a string and its index.
o Input: "hello world", "world"
o Output: True, Index: 6
5. Vowel and Consonant Count: Count the number of vowels and consonants in a
string.
o Input: "engineering"
o Output: Vowels: 5, Consonants: 6
String Manipulation
Applications of Strings