Program 9
This assignment will have you practice the modification of strings. For this assignment you will be making a paragraph formatter.
Create the following character arrays:
Array “name” of length 40 initialized to the character ‘'0’.
Array “superman” of length 80 initialized to the character ‘'0’.
The program should do the following steps.
Ask the user for a name (first and last) and store it in array name.
Using a for loop, change any upper case character in array name to lower case.
Change the first letter in array name to upper case.
Using a for loop, find the first space character in array name and change the character after it from lower case to upper case.
Place the phrase “The identity of superman is: “ in array superman using the string.h functions (do not use scanf or gets, the phrase is not inputted by the user”).
Add the string in array name to array superman without overwriting the phrase stored in it.
Display the string stored in array superman.
Exit the program.
The program run should be as follows:
Please enter a name: JoHN DoE
The identity of superman is: John Doe.
Program 9 This assignment will have you practice the modification of strings. For this assignment you will be making a paragraph formatter. Create the following character arrays: 1- Array “name” of length 40 initialized to the character ‘\0’. 2- Array “superman” of length 80 initialized to the character ‘\0’. The program should do the following steps. 1- Ask the user for a name (first and last) and store it in array name. 2- Using a for loop, change any upper case character in array name to lower case. 3- Change the first letter in array name to upper case. 4- Using a for loop, find the first space character in array name and change the character after it from lower case to upper case. 5- Place the phrase “The identity of superman is: “ in array superman using the string.h functions (do not use scanf or gets, the phrase is not inputted by the user”). 6- Add the string in array name to array superman without overwriting the phrase stored in it. 7- Display the string stored in array superman. 8- Exit the program. The program run should be as follows: Please enter a name: JoHN DoE The identity of superman is: John Doe.