Question: Write one program containing all these string exercises. Exercise 1.2.1 Read a string from the user into a string named stringl Test it with the
Write one program containing all these string exercises. Exercise 1.2.1 Read a string from the user into a string named stringl Test it with the data: Good morning Print the following heading and the data contained in stringl Exercise 1 Good morning Exercise 1.2.2 Create a new string named string2 containing the contents from stringl Append the following text to the end of string 2 sleepy heads (Note that there is a space before sleepy.) Print the following heading and the data contained in string2 Exercise 2 Good morning sleepy heads Exercise 1.2.3 Create string3 with an initial value of bellow cello fellow hello mellow Novello Othello pillow Rollo solo yellow Find the location of the first h in string3 Print the following heading and the location found in string3 Exercise 3 The first h is at column (put the column number here) Exercise 1.2.4 Create an empty string named string4 Copy string3 into string4 Using the location found in exercise 3, change the first h into a J Print the following heading and the data contained in string4 Exercise 4 bellow cello fellow Jello mellow Novello Othello pillow Rollo solo yellow
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
