(a)
string str = "Hello
World";
When I print str
, the output is:
Hello
World
(b)
string str;
cin >> str; //given input as Hello
World
When I print str
, the output is:
Hello
World
What is the difference between (a) and (b)?
question from:https://stackoverflow.com/questions/51864157/why-are-escape-characters-not-working-when-i-read-from-cin