Lab Strings
Lab Strings
1) Write a program that converts all lowercase characters in a given string to its equivalent
uppercase character.
2) Write a program that extracts part of the given string from the specified position. For example,
if the sting is "Working with strings is fun", then if from position 4, 4 characters are to be
extracted then the program should return string as "king". Moreover, if the position from where
the string is to be extracted is given and the number of characters to be extracted is 0 then the
program should extract entire string from the specified position.
3) Write a program that converts a string like "124" to an integer124.
4) Write a program that replaces two or more consecutive blanks in a string by a single blank. For
example, if the input is
6) Write a program that takes a set of names of individuals and abbreviates the first, middle and
other names except the last name by their first letter.
7) Write a program to count the number of occurrences of any two vowels in succession in a line
of text. For example, in the sentence
“Pleases read this application and give me gratuity”
such occurrences are ea, ea, ui.