- Information
- AI Chat
Was this document helpful?
OOPs Interview Question
Course: Software Engineering (CS530)
376 Documents
Students shared 376 documents in this course
University: Visvesvaraya Technological University
Was this document helpful?
OOPs Interview Qns & Ans Micro CheatBook
1) What is OOPS?
OOPS is abbreviated as Object Oriented Programming system in which programs are
considered as a collection of objects. Each object is nothing but an instance of a class.
2) Write basic concepts of OOPS?
Following are the concepts of OOPS:
1. Abstraction
2. Encapsulation
3. Inheritance
4. Polymorphism
5.
3) What is a class?
A class is simply a representation of a type of object. It is the blueprint/plan/template that
describes the details of an object.
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.
Levels are Public, Protected, Private, Internal, and Protected Internal.
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.
8) What are manipulators?
Manipulators are the functions which can be used in conjunction with the insertion (<<) and
extraction (>>) operators on an object. Examples are endl and setw.
9) Explain the term constructor
A constructor is a method used to initialize the state of an object, and it gets invoked at the time
of object creation. Rules for constructor are:
Constructor Name should be the same as a class name.
A constructor must have no return type.