Table of Contents
Back Button
Back to Chapter
C++ Setting Up
C++ Introduction
No items found.
C++ Basics
No items found.
C++ Control Statements
No items found.
C++ Logical Operators
No items found.
C++ Procedural Programming
No items found.
C++ Structural Programming
No items found.
C++ Implementation of OOPS
No items found.
C++ Arrays and Vectors
No items found.
C++ Error Handling
No items found.
C++ File Handling
No items found.

C++ Hello World

To see how C++ works, copy-paste the code given below and run the program. If you need instructions on how to save and execute scroll down.

#include using namespace std; main() { cout<<"Hello World"; //cout basically tells the compiler to display //what's in the "" on the screen }
Output: Hello World

First save your file:

click on save as.

Choose the location where you wish to save your file and click save.

Once it is saved, we need to run and check the program.

Execute>>Compile and run

After a few seconds the output should be visible on .exe file.

If your code has any errors the compiler will detect them and they will be displayed in the error window.

Spot the error in the  given code.

C++ will spot the error during compilation and highlight the error while also displaying a message on how to correct the error.

Ask queries
Contact Us on Whatsapp
Hi, How Can We Help You?