2. In computing, C is a general-purpose programming
language initially developed by Dennis Ritchie between
1969 and 1973 at AT&T Bell Labs.
C is a procedural language in which we focus on
mathematical and algorithm.
Simple C Program
# include <stdio.h>
int main(void) {
printf(“Hello Worldn”);
return 0;
}
3. C++ was originally developed to be the next
version of C, not a new language. it was developed
by Bjarne Stroustrup starting in 1979 at Bell Labs
It is an object oriented programming language in
which we focus on real life problem.
Simple C++ Program
#include <iostream.h>
int main(void) {
cout << “Hello Worldn”;
return 0;
}
4. Differences
C
it is most stable for handling small
programme.
C++
it is for handling large programme.
C
it follows top down approach.
C++
it flows bottom up approach.
5. C
Data in shareable mode. i.e. Data can be accessed by other function.
C++
Data in non shareable mode. i.e. Data can not be accessed by other
function.
C
It does not support function overloading (two functions may have
the same name).
C++
It support function overloading (function names must be unique).
C
Data is not secured in ‘c’ .
C++
Data is secured in ‘c++’ .
6. BASIC FEATURES OF OBJECT ORIENTED
PROGRAMMING LANGUAGE (OOPS)
OBJECT CLASS
MESSEGE
PASSING OOPS INERITANCE
DYNAMIC POLYMORPHI
BINDING SM
7. OBJECTS
Objects are basic runtime entity in object oriented system. When a
program is executed, the objects interact by sending messages to one
another .
CLASS
Classes are user defined data types and it behaves like built in
types of programming language. It is the way to bind the data and
function to gather in a single unit.
INHERITANCE
The mechanism of deriving a new class from an old class is
called inheritance or derivation. The old class is known as base class
while new class is known as derived class or sub class. The inheritance is
the most powerful features of OOP.
8. POLYMORPHISM
Polymorphism is a Greek term which means ability to take more than one
form.
For example, + is used to make sum of two numbers as well as it is used to combine
two strings.
DYNAMIC BINDING
Dynamic binding means link exist between procedure call and code to be
execute at run time when that procedure is call.
MESSAGE PASSING
Objects can communicate with each others by passing message same as
people passing message with each other. Message passing involves name of object,
name of function (message) and information to be send.