Which of the following statements gets a string from the keyboard until the newline character is encountered and assigns the string to a variable named myStr?

A. getline(cin, myStr, '/n');
B. getline(myStr, cin);
C. getline(myStr, cin, '\n');
D. getline(cin, myStr);

Answer: D

Computer Science & Information Technology

You might also like to view...

Select the main reason for the initial development of the World Wide Web from the list below:

a. To allow companies to advertise over the Internet. b. To allow companies to conduct commerce over the Internet c. To allow communication between researchers and links between research papers d. none of the above

Computer Science & Information Technology

A comment can be edited by clicking in the comment balloon and keying the changes you want to make.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology