C++ Program to display "Hello, World!"


This content was proof-read by Grammarly. You can Try Grammary for FREE

Problem

Write a program in C++ to display “Hello, World!” on the screen.

C++ Program to display “Hello, World!” in Console Window.

This is a simple C++ program that displays “Hello, World!” on the console window. This program provides a quick insight on to the syntax of the C++ language for the beginners.

#include <iostream>
int main() 
{
    // Program to display Hello World by Abundantcode.com
    std::cout << "Hello, World!\n";
    return 0;
}

Output

Hello, World!

The C++ programs starts with the main() function. The function cout is a standard output stream which prints the text to the display. Like the C program , the return 0 defines the exit status of the C++ program.

Newsletter Signup

Subscribe to our weekly newsletter below and never miss the latest product or an exclusive offer.

Newsletter Signup

Subscribe to our weekly newsletter below and never miss the latest product or an exclusive offer.

%d bloggers like this: