Easy Tutorial
❮ Cpp Variable Scope Cpp Files Streams ❯

C++ Example - Output "Hello, World!"

C++ Example

Using C++ to output the string "Hello, World!", this is a simple introductory example. It requires the main() function and the standard output cout:

Example

#include <iostream>
using namespace std;

int main() 
{
    cout << "Hello, World!";
    return 0;
}

The output of the above program is:

Hello, World!

C++ Example

❮ Cpp Variable Scope Cpp Files Streams ❯