C++ MQCs with Explanation.( CHAPTER 2: BEGINNING WITH C++)

Which of the following statements provide two lines of output? ?

  1. cout << ”VERY” << “GOOD”;
  2. cout << ”VERY” “\n” << “GOOD” “\n”;
  3. cout << ”VERY” “\\n” << “GOOD” “\n”;
  4. cout << “VERY” << “GOOD” “\n”;



Answer: 
Option b: cout << ”VERY” “\n” << “GOOD” “\n”;

Explanation Here

Post a Comment

0 Comments