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...

Polymorphism specifically enables the creation of programs that handle:

a) classes that are containers for other classes b) large amounts of data with efficiency c) a wide variety of classes in a general manner d) None of the above

Computer Science & Information Technology

What is not a common format for a number control?

A) Currency B) Percent C) Accounting D) Comma

Computer Science & Information Technology

Use the ________ command to change the display of headings in narrow columns or for multiple rows

A) Text Direction B) Change Direction C) Change Position D) Align Heading

Computer Science & Information Technology

Which technology was designed to be a short range networking technology (up to 10 meters) that could connect different devices together?

What will be an ideal response?

Computer Science & Information Technology