UrbanPro
true

Take BA Tuition from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

C++ Overview

N
Namrata Y.
05/03/2018 0 0

Introduction:

C++ is the first object oriented programming language used universally as an advanced version of C language. Many features such as Inheritance, Class & Object, Polymorphism(Function overloading) etc are introduced in C++ which are not available in C Language.

There are many differences between C & C++ few are mentioned below:

Difference between C & C++:

C

C++

C supports procedural programming paradigm for code developmen

C++ supports both procedural and object oriented programming paradigms; therefore C++ is also called a hybrid language.

Follows top-down approach.

Follows bottom up approach.

C is a subset of C++. It cannot run C++ code.

C++ is a superset of C. C++ can run most of C code while C cannot run C++ code.

Function-driven language

Object-driven language

Low-level language

Middle-level language

C requires one to declare all the variables at the top of the program.

In C++, the variables can be declared anywhere in the program before use.

The default header file used in C language is stdio.h

The default header file used in C++ is iosteam.h

The features which are supported in C++ and not available in C Language:

Functions inside Structure:

In case of C++, functions can be used inside a structure while structures cannot contain functions in C.

Classes and Objects:

Class is a user defined datatype which contains member variables and member functions.

Object is a instance of defined class which helps to access member variable and member functions of the class.

We can define as many objects as we can for one class.

Function Overloading:

Function overloading is also known as a Polymorphism. Function overloading enables programmer to use same function name for multiple time(with different definition) through out the program.

Inheritance:

Inheritance is the capability of one class to acquire properties and characteristics from another class. The class whose properties are inherited by other class is called the Parent or Base or Super class. And, the class which inherits properties of other class is called Child or Derived or Sub class.

Constructor and Destructor:

A class constructor is a special member function of a class that is executed whenever we create new objects of that class. Constructor has the same name as class name. 

A destructor is a special member function of a class that is executed whenever an object of it's class goes out of scope or whenever the delete expression is applied to a pointer to the object of that class. Destructor also has the same name as class name but only declared with tilde sign (~) before the declaration.

C++ has  many other features such as namespace, exception handling, reference variable etc. More detailed information will be covered in upcoming articles.

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

C Programming Introduction
Beginners: C Programming is the base of all programming languages we learn. This Page will help you to understand all difficulties you may face in writing a simple program. What to remember while...
N

Namrata Y.

0 0
0

Cloud Computing
Introduction: In online world, we get information with just one click. But where this all information is stored? How we can store so much data from anywhere and can access from everywhere. No time bound,...
N

Namrata Y.

1 0
0

Looking for BA Tuition ?

Learn from Best Tutors on UrbanPro.

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for BA Tuition Classes?

The best tutors for BA Tuition Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Take BA Tuition with the Best Tutors

The best Tutors for BA Tuition Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more