#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
#include <iostream>
: This line includes the input/output stream library, allowing the program to perform input and output operations.int main() { }
: This is the main function where the execution of the program begins. It serves as the entry point for the program.std::cout << "Hello, World!" << std::endl;
: std::cout
is used to output data. Here, it outputs the string "Hello, World!" followed by std::endl
, which denotes the end of the line.return 0;
: This statement indicates that the program execution was successful, and it returns a value of 0 to the operating system, signifying successful termination.