Google News
logo
CPP - Quiz(MCQ)
Which of the following is the correct syntax to print the message in C++ language?
A)
cout <<"Hello world!";
B)
Cout << Hello world! ;
C)
Out <<"Hello world!;
D)
None of the above

Correct Answer :   cout <<"Hello world!";


Explanation : To print the message in the C++ language user can use the following syntax :

#include <iostream>  
using namespace std;  
  
int main() {  
  cout << "Hello World!";  
  cout << "I am learning C++";  
  return 0;  
}  ​

Advertisement