Top 50-OOPs Interview Questions ?
Top 50-OOPs Interview Questions ?
me/the_rising_engineers
TOP 50-OOPs
INTERVIEW QUESTION
EXCLUSIVE INTERVIEW CHEATSHEET
Curated By-
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
3) What is a class?
4) What is an Object?
An object is an instance of a class. It has its own state, behavior, and identity.
5) What is Encapsulation?
Encapsulation is an attribute of an object, and it contains all data which is
hidden. That hidden data can be restricted to the members of that class.
6) What is Polymorphism?
Polymorphism is nothing but assigning behavior or value in a subclass to
something that was already declared in the main class. Simply, polymorphism
takes more than one form.
7) What is Inheritance?
Inheritance is a concept where one class shares the structure and behavior
defined in another class. If Inheritance applied to one class is called Single
Inheritance, and if it depends on multiple classes, then it is called multiple
Inheritance.
Example
void add(int& a, int& b);
• Call by Value – Value passed will get modified only inside the function,
and it returns the same value whatever it is passed into the function.
• Call by Reference – Value passed will get modified in both inside and
outside the functions and it returns the same or different value.
Overriding is the same method names with the same arguments and return
types associated with the class and its child class.
• Private
• Protected
• Public
• Friend
• Protected Friend
Doing Inheritance from that class.-Use Base Keyword from a derived class.
Curated By-
Example –
Virtual void function1() // Virtual, Not pure
False.
The superclass is the parent class from which another class inherits.
Dynamic Binding is a binding in which name can be associated with the class
during execution time, and it is also called as Late Binding.
Curated By-
HIMANSHU KUMAR(LINKEDIN)
http://www.linkedin.com/in/himanshukumarmahuri