ExamVeda
Login
Home
Introduction to C plus plus
?

What will be the output of the following C++ code?
#include <iostream>
 
int main(int argc, char const *argv[])
{
	cout<<"Hello World";
	return 0;
}

Answer & Solution
Correct Answer: Option A
The given code is a basic C++ program that prints a message to the console.

It includes the <iostream> header, which allows the use of input and output streams like cout.

The main function is defined correctly with appropriate parameters (int argc, char const *argv[]), though these parameters are not used.

cout<<"Hello World"; correctly outputs the text "Hello World" to the standard output.

There are no syntax or runtime errors in the code, and it will compile and run successfully.

Therefore, the output will be: Hello World
Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Gopal Ambore
Gopal Ambore 1 year ago
Plz give description for coding problems.