Partially Object-Oriented Programming Language
Partially Object-Oriented Programming Language
C C++
Procedure oriented programming language Partially object-oriented programming language
Follows top-down approach Follows bottom-up approach
Doesn’t support function or operator Supports Function as well as operator
overloading overloading
Doesn’t support virtual and friend function Supports both
32 Keywords 52 Keywords
Objects are defined as an instance of a class once the object is created, then it can operate
on both data members and member functions.
Private – within class, Public – within package and protected – within derived classes
Inheritance – Process in which child class inherits all properties and behaviour of parent
class. Inherited class is called base class and the class which inherits is called derived class
Abstraction - Hiding the internal details for simplicity and showing the functionality to the
user
While loop verifies the condition, if it’s true Do while loop first iterates the loop body
then it iterates the loop till the condition once then it checks for the condition
becomes false
if the condition in while loop false, then not Body will execute once
a single statement will execute inside the
loop
6. What is a Constructor?
A constructor is a member function that is invoked whenever we execute an object, it has
the same name as that of class
Default copy
User defined copy