Question: Assume a string object has been defined as follows: string description; 1) Write a cin statement that read in a one-word string. (1 point) (

Assume a string object has been defined as follows:

string description;

1) Write a cin statement that read in a one-word string. (1 point)

( it will read only one word, no blank space. Example: programming)

2) Write a statement that reads in a string that can contain multiple words separated by blanks. (2 Points)

(it will read the entire sentence including spaces, not just one word. Example: I love C++ programming very much)

Note: No need to write complete program. Just write the answer for both.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!