OOPS
OOPS
OOPS
1. Abstraction.
2. Encapsulation.
3. Inheritance.
4. Polymorphism.
3. What is a class?
4. What is an object?
5. What is Encapsulation?
6. What is Polymorphism?
7. What is Inheritance?
Example
void add(int& a, int& b);
void add(double& a, double& b);
void add(struct bob& a, struct bob& b);
15. What is operator overloading?
Operator overloading is a function where different operators are
applied and depends on the arguments. Operator,-,* can be used to
pass through the function , and it has their own precedence to execute.
Call by Value – Value passed will get modified only inside the function ,
and it returns the same value whatever it is passed it 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 same arguments and return
types associates with the class and its child class.
Private.
Protected.
Public.
Friend.
Protected Friend.
29. What is sealed modifiers?
30. How can we call the base method without creating an instance?
Static method.
The new modifier instructs the compiler to use the new implementation
instead of the base class function. Whereas, Override modifier helps to
override the base class function.
There are three various types of constructors , and they are as follows:.
False.
Sub class is a class that inherits from one or more base classes.
Super class is the parent class from which another class inherits.
Binding is nothing but the association of a name with the class. Static
binding is a binding in which name can be associated with the class
during compilation time , and it is also called as early Binding.