Answer to Question #246656 in C++ for mohamed

Question #246656

1. Will the following lines of code print the same thing? Explain why or why not.

std::cout << 6 << '\n';

std::cout << "6" << '\n';




1
Expert's answer
2021-10-04T23:10:58-0400

The first line is printing an integer 6 while line two prints a string 6. However, their output in the console is the same. Hence, the two lines of code print the same thing.


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