Thursday, December 13, 2018
Home > C++ > Introduction to C++

What is a Language?

The method of human communication, either spoken or written, consisting of the use of words in a structured and conventional way.

What is a Programming Language?

A programming language is a formal computer language or constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.

What is C++?

C++ is an extension to C language and is developed by Bjarne stroustrup at bells laboratories. It is and intermediate language as it comprises confirmation of both high level and low level languages.

C++ has different benefits over C language.

One of the major difference between two is C++ is object oriented while C is procedural language.

Some other benefits includes:

  • Exception Handling
  • Function overloading and overriding
  • Operator overloading.
  • Concept of constructors and destructors
  • Virtual functions

What is a computer program?

A computer program is a set of instruction given to a computer to perform a particular task.
In c++ a program is a set of instructions written in c++ language. These instructions are often called statements, every c++ statement must end with a semicolon (;).

What is the basic structure of a c++ program?

The basic structure of a c++ program is:

// Header files to be included
#include "stdafx.h"
/* including standard library
This declaration allows all elements in the 
std namespace to be accessed without the std:: prefix */
using namespace std;
// Starting point of every c++ program to start its execution
void main()
     // start of main function
    // Body of Main Function
}   // end of main function  

First Program: –

#include "stdafx.h"
#include "iostream"//Header file used to/from console Screen.
using namespace std; void main() { //Writes Hello world to output console Screen. cout << "Hello world"; getchar(); // To hold the output console screen. }


first program

One thought on “Introduction to C++

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: