C++ Basics
C++ is a powerful general-purpose programming language. It can be used to develop operating systems,
browsers, games, and so on. C++ supports different ways of programming like procedural, object-oriented,
functional, and so on. This makes C++ powerful as well as flexible.
After doing this module, you will be able to:
1. Identify the different parts of the C++ program.
2. Use constants, operators, and expressions correctly in the c++ programs
3. Create a c++ programs successfully
DISCOVER
C++ basics - Discussion & Summary to learn about:
Parts of a C++ Program
Global Declarations
Data Types
Comments
Keywords
The cout and cin Statements
Constants
DISCUSS
C++ PROGRAMING TUTORIALS
Hello World – First C++ Program
In this guide we will write and understand the first program in C++ programming. We are writing a
simple C++ program that prints “Hello World!” message. Let’s see the program first and then we will
discuss each and every part of it in detail.
Hello World Program in C++
/*
* Multiple line
* comment
*/
#include<iostream>
//Single line comment
using namespace std;
//This is where the execution of program begins
int main()
{
// displays Hello World! on screen
cout<<"Hello World!";
return 0;
}
C++ is a powerful general-purpose programming language. It can be used to develop operating systems,
browsers, games, and so on. C++ supports different ways of programming like procedural, object-oriented,
functional, and so on. This makes C++ powerful as well as flexible.
After doing this module, you will be able to:
1. Identify the different parts of the C++ program.
2. Use constants, operators, and expressions correctly in the c++ programs
3. Create a c++ programs successfully
DISCOVER
C++ basics - Discussion & Summary to learn about:
Parts of a C++ Program
Global Declarations
Data Types
Comments
Keywords
The cout and cin Statements
Constants
DISCUSS
C++ PROGRAMING TUTORIALS
Hello World – First C++ Program
In this guide we will write and understand the first program in C++ programming. We are writing a
simple C++ program that prints “Hello World!” message. Let’s see the program first and then we will
discuss each and every part of it in detail.
Hello World Program in C++
/*
* Multiple line
* comment
*/
#include<iostream>
//Single line comment
using namespace std;
//This is where the execution of program begins
int main()
{
// displays Hello World! on screen
cout<<"Hello World!";
return 0;
}