subject

Read a string from the user into a string named string1.

test it with the data: good morning

print the following heading and the data contained in string1:

exercise 1

good morning

exercise 1.2.2

create a new string named string2 containing the contents from string1.

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

20

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 j

print the following heading and the data contained in string4:

exercise 4

bellow cello fellow jello mellow novello othello pillow rollo solo yellow

exercise 1.2.5

create a copy of string3 named string5.

use the find_last_of member function to find the position of the last l

print the following heading and the position of the last l

exercise 5

69

exercise 1.2.6

create a new string named string6 containing the contents from string3.

using the position of the last l found in exercise 5, erase all

characters from string6 following the last l

print the following heading and the data contained in string6:

exercise 6

bellow cello fellow hello mellow novello othello pillow rollo solo yell

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:40
If you arrive at the same time as another user straight across from you yield if a. they flash your headlights at you b. you can’t see their turn signals c. you’re going street and they’re running d. you’re turning they’re going straight plz
Answers: 1
question
Computers and Technology, 22.06.2019 08:30
1.the index finger on your right hand types the f r v 4 j u m 7 h y 6 n lo.9 j u 7 m g t 5 b 2.if you need to multiply 400, 2, and 1 ½, what would you type on the numeric keypad? 400*2*1.5 400/2*1.5 400/2/1.5 400*2*1½ 3.select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair. rest your palms on the keyboard. relax your fingers. keep your hands lower than your elbows.
Answers: 1
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
You know the right answer?
Read a string from the user into a string named string1.

test it with the data: good mo...
Questions
Questions on the website: 13722367