Problem statement :
Start from the famous 'Hello World' code. This program prints 'Hello World' when executed.
Explanation :
The 'Hello World' is a common or simple example to check compiler and library presence. It has minimum chances of user error (during compilation), because it has only one file to compile.
This simple program uses the C++ standard library, with std::cout
from <iostream>
.
Code :
#include <iostream> // Driver int main() { // Your first program std::cout << "Hello World!" << std::endl; }
Output :
The output of the program should be −
Hello World!