Answer to Question #176171 in C++ for abhishek jaswal

Question #176171

6. Which of the following is the correct syntax to read a sentence from the user and store in variable "name" in C++?


cin >> name;


getline(name, cin);


cout << name;


getline(cin, name);


1
Expert's answer
2021-03-27T10:19:58-0400

Answer:cin >> name;


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS