2. assume a string object has been defined as follows: string description; a) write a cin statement that…

2. assume a string object has been defined as follows: string description; a) write a cin statement that reads in a one - word string. b) write a statement that reads in a string that can contain multiple words separated by blanks.
Answer
Explanation:
Step1: Read one - word string
In C++, to read a one - word string using cin, we can directly use cin with the variable name.
cin >> description;
Step2: Read multi - word string
To read a string that can contain multiple words separated by blanks, we use getline(cin, description);
Answer:
A. cin >> description;
B. getline(cin, description);