OBJECT ORIENTED PROGRAMMING | DIFFERENCE BETWEEN C AND C++

By | September 9, 2017
Spread the love

OBJECT-ORIENTED PROGRAMMING, DIFFERENCE BETWEEN C AND C++

*object oriented programming language is the type of programming language where programmer need to define both datatype and type of operation applied to that data structure.

*In simple words, the object contains both data and function.

Here are some of the key features of OOP,

  1. Abstraction: Object-Oriented Programming only displays essential feature of an application. Complete details are not displayed.

Eg: Vehicle is an abstraction, you can use for driven, horse riding and motor driving.

  1. Interface: Defines properties of abstraction.

Eg: For vehicles, the interface is camels, elephants.

  1. Inheritance: In this technique, the user can re-use the existing code again and again.
  2. Polymorphism:  Allows executing same procedure differently.

Examples of OOP- C++, Java, PHP, C, Python.

 

Now let’s see the difference between the Procedural programming language and Object Oriented Programming language.

DIfference between pop and oop

ABOVE IMAGE CREDITS::: http://practice.geeksforgeeks.org/problems/difference-between-procedural-language-and-object-oriented-language

Procedural Programming language

If you want to execute something, you need to give step by step instructions manually to execute it.

Procedures are called as Subroutine, routine.

Object Oriented Programming language

Object component of the program knows how to program.

An Object is a logical person, which contains both data and procedure.

So, C++ is hybrid language, which has both procedural and object-oriented approach.

Difference between C and C++

DIFF BETWEEN C AND C++

IMAGE CREDITS:: slideplayer.com

       C PROGRAMMING C++ PROGRAMMING
Procedural does not support classes, object. Both procedural and object
C is subset of C++ C++ is superset of C
Not support polymorphism, encapsulation, inheritance.  Supports all these properties.
Data and function are separate and both are free identity. Data + Function=Object
Malloc(), calloc() used to allocate dynamic memory.

Free()—memory de allocation.

new-memory allocation

delete – memory de-allocation.

 

Other Knowledge sources where you can clear your concept,

http://www.brighthub.com/internet/web-development/articles/73520.aspx

YOU MIGHT LIKE THIS

WHAT IS C++? | APPLICATIONS OF C++

HYPERLOOP-THE FIFTH MODE OF TRANSPORTATION

WHY IS KOTLIN THE EASIEST ANDROID DEVELOPMENT LANGUAGE?

HOLOLENS-YOU CAN CREATE YOUR DESIRED WORLD

WHY IS SOCIAL MEDIA MARKETING  IN BUZZ?

HOW INTERNET WORKS? WHO OWNS IT?


Spread the love
Category: C++ Tutorials Tags:

About Manojkumar M M

Manojkumar is a Digital Marketing Expert from Bangalore, India. He has got 3 years of experience in the field of Digital Marketing. He worked with many start-ups to help them in improving their Business Lead Generation through online. He blogs about digital marketing tips, technology updates, programming language tips at this blog Techgeetam.com. Contact me for any kind of help in the field of Digital Marketing. Mail Id - digimanoj98@gmail.com

Leave a Reply

Your email address will not be published.