C++ Programming Language
C++ is an object oriented higher level programming language. This is invented of by Bjarne Stroustrup in bell labs in year 1979. This is called incremented and successor of c programming language. This are supported 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.
using namespace std;
//Count are use to display message.
//in this case print C++ Programming.
//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.
|C are invented by dennis ritchie in between year of 1969 to 1973.
|C++ invented by Bjarne Stroustrup at bell labs in 1979.
|C not support OOPS concept.
|C++ are provide the feature of OOPs. like inheritance, abstraction, polymorphism etc.
|Dynamic memory are create using malloc(),calloc() and realloc() function.
|We can create dynamic memory and object in c++ using of new operator.
|Free dynamic memory using free() function.
|Free dynamic memory using delete operator.
|C does not allow virtual and friend functions.
|We can create virtual and friend function c++.
|C programming, we cannot create function inside a structure.
|C++ are allowed to create functions inside a structure.
|In C are not allowed function and operator overloading.
|C++ are allowed.
|C are support only 32 keywords.
|C++ are support only 95 keywords.
|C not allowed to set two variable same address.
|C++ not allowed to set two variable same address.
|C are not provide exception handling methods.
|Exception handling are possible in c++ programming