Writing first C++ program: Hello World

C++ is a general-purpose programming language that supports procedural, object-oriented, and generic programming. C++ is a superset of C and all valid C programs are valid in C++ as well.

C++ supports object-oriented programming with features such as data hiding, encapsulation, inheritance, polymorphism etc.

Let us see the first C++ program that prints Hello, World!.

#include <iostream>
using namespace std;
int main() {
   cout << "Hello, World!" << endl; // This prints Hello, World!
   return 0;


Hello, World!
Sharing Is Caring

Leave a Comment