String Programs.
String Programs.
1. Write a program to count the number of times a character occurs in the given string.
2. Write a program which replaces all vowels in the string with "*".
3. Write a program which reverses a string and stores the reversed string in a new string.
4. Write a program that prompts for a phone number of 10 digits and two dashes, with dashes
after the area code and the next three numbers. For example, 017-555-1212 is a legal input.
5. Write a program that asks the user for a string (only single space between words) and returns an
estimate of how many words are in the string. (Hint. Count number of spaces)
6. Write a program to input a formula with some brackets and checks, and prints out if the formula
has the same number of opening and closing parentheses.
7. Write a program that inputs a line of text and prints out the count of vowels in it.
8. Write a program to input a line of text and print the biggest word (length wise) from it.
9. Write a program to input a line of text and create a new line of text where each word of input
line is reversed.
10. Write a program to input a string and print each individual word of it along with its length.