C++ Programming Language

Cpp is an object oriented programming language (Oops).this are initially invented by Bjarne Stroustrup at bell labs in 1979. This is called incremented and successor of c programming language. This are support both low and high level programming feature. this reason it also called intermediate language.

Structure of C++ Program

/*
    Simple program to Display User message
    */
    /*
    Include header file at top of program. 
    In this case iostream header file are used of utilize cout in our program.
    */
    #include<iostream>

    using namespace std;
    int main(){
    //Count are use to display message.
    //in this case print C++ Programming.
    cout<<"C++ Programming";

    return 0;
    //end of execution of program 
  }

What is Object Oriented Programming?

Object oriented programming (oop) is strategy of software designing technique. There are providing the lot of features. Help of oops concept we can make faster, secure and reliable application. here given small overview of this features.

Class: class is user defined data type. they are contain data member and member function. help of class object access those member and function. or we can say class is like blue print of objects.

Object: when declare any class there is not allocated any memory. when create object then allocated memory of objects. and help of object we are capable to access data member and functions of class.

Abstraction: Abstraction is provide only essential features and hiding its implementation and background process.

Encapsulation: Data member and member function are binding of into single unit. example class.

Inheritance: This is allowed to access the properties of base class to derived class. and provide reusability of codes.

Polymorphism: They are combination of two greek words poly (many) and morphism (many forms). polymorphism are similarly to take more than one form. example function overloading and operator overloading.

Dynamic Binding: Deciding the execution of specific sequence like method or function at run time that is called dynamic binding. This is also known as run time and late binding.

Difference between c and c++

There are lot of variety difference of c and c++ programming. here given 10 difference.

No Key Point C C++
1 Invented C are invented by dennis ritchie in between year of 1969 to 1973. C++ invented by Bjarne Stroustrup at bell labs in 1979.
2 OOPS C not support OOPS concept. C++ are provide the feature of OOPs. like inheritance, abstraction, polymorphism etc.
3 Dynamic memory Dynamic memory are create using malloc(),calloc() and realloc() function. We can create dynamic memory and object in c++ using of new operator.
4 Free memory Free dynamic memory using free() function. Free dynamic memory using delete operator.
5 Function C does not allow virtual and friend functions. We can create virtual and friend function c++.
6 Structure C programming, we cannot create function inside a structure. C++ are allowed to create functions inside a structure.
7 Overloading In C are not allowed function and operator overloading. C++ are allowed.
8 Keywords C are support only 32 keywords. C++ are support only 95 keywords.
9 Variable Referencing C not allowed to set two variable same address. C++ not allowed to set two variable same address.
10 Exception handling C are not provide exception handling methods. Exception handling are possible in c++ programming

© 2019, regularcodes.com, All rights reserved