QUESTION BANK FOR OOPS

State the characteristics of procedure oriented programming.

What are the features of Object Oriented Programming?

Distinguish between Procedure Oriented Programming and Object Oriented Programming.

List out the basic concepts of Object Oriented Programming.

Define Objects

Define Class.

Define Encapsulation and Data Hiding.

Define Data Abstraction.

Define data members and member functions.

State Inheritance.

State Polymorphism.

List and define the two types of Polymorphism.

State Dynamic Binding.

Define Message Passing.

List out some of the benefits of OOP.

List out the applications of OOP.

What are the input and output operators used in C++?

List out the four basic sections in a typical C++ program.

Define token. What are the tokens used in C++?

Explain the difference between Structure and Class.

Define identifier. What are the rules to be followed for identifiers?

Define an enumeration data type.

List out the new operators introduced in C++.

What is the use of scope resolution operator?

Define the 2 memory management operators.

List out the advantages of new operator over malloc ().

Define manipulators. What are the manipulators used in C++?

What are inline functions?

Explain typecasting.

Define function overloading.

List out the limitations of function overloading.

State the difference between structures and class.

List the access modes used within a class.

How can we access the class members?

What is a nested class? What is its use?

Where can we define member functions?

What is static data member?

What is static member function?

What is a constant function?

Define reference variable in C++.

What is overriding?

What is a volatile function?

Define friend function?

What are constant objects?

How can we use pointers with an object?

What is a local class?

Explain in detail about the reference variables.

What are the difference between reference variables and normal variables?

Explain about call-by-reference and return by reference.

What are the difference between pointers to constants and constant to pointers?

Write a program to demonstrate how a static data is accessed by a static member function.

What is friend function? What is the use of using friend functions in c++? Explain with a program.

Discuss in detail about default arguments with an example.

Explain about constant and volatile functions with an example.

Describe Abstract class. Illustrate an example to explain it.

Write a program to implement nested classes using c++.

Write a program to get the employee details and print the same using pointers to objects and pointers to members of a class. Create a class employee. And use appropriate functions and data members.

Define Constructor.

List some of the special characteristics of constructor.

Give the various types of constructors.

What are the ways in which a constructor can be called?

Define default constructor

Define parameterized constructor

Define default argument constructor

Define copy constructor

Define dynamic constructor

Define multiple constructors

State dynamic initialization of objects.

Define Destructor.

Give the general form of an operator function.

List some of the rules for operator overloading.

What are the types of type conversions?

What is an explicit constructor?

What is operator overloading?

How are operators overloaded?

Why are they overloaded?

List out the operators that cannot be overloaded.

List out the operators that cannot be overloaded using Friend function.

Explain basic to class type conversion with an example.

Explain class to basic type conversion with an example.

Explain one class to another class conversion with an example.

Explain copy constructor and destructor with suitable C++ coding.

Explain about Implementation of simple ADTs.

Explain with the program about multiple constructors.

Explain in detail about constructor with dynamic allocation.

With an example explain about operator overloading through friend functions.

What is a virtual destructor? Explain the use of it.

Explain about Unary Operator and Binary Operator Overloading with program.

List out the rules for overloading operators with example.

Define a supplier class. Assume that the items supplied by any given supplier are different and varying in number. Use dynamic memory allocation in the constructor function to achieve the solution. Define a person class with more than three constructors. Define data and function members in the class such a way that all three constructors are meaningful

What is generic programming? How it is implemented in C++?

What are function templates?

What is the need for function templates? How are they created?

How is a function template overridden for a specific data type?

What are class templates?

What is the need for class templates? How are they
created?

What is the difference between template function and template class?
What is exception handling?

What is the need for exception handling?

100. What is the difference between macro and templates?

101. Which three keywords are provided by c++ for implementing exception handling?

102. Why nested exception classes needed?
103. How uncaught exception caught?
104.What are methods of exception handling in c++?

105.What is need of Templates? Explain.
106.Explain about function templates?
107. Implement quick sort as a generic function.
108. Write a program for generic queue class with two member functions, insert and delete. Use the array to implement the queue.

109.Define a stack. The class should throw an exception when the stack underflow and overflow takes place.
110. Using the Time class, throw an exception when invalid time is input, write set_terminate to provide your own terminate function, which care of this problem.
111. What is uncaught exception function? Give an example.
112.What are the use of terminate () and Unexpected functions? Explain with a program.
113.How to use multiple catch functions inside a program? Explain with a program.
114.Write all blocks of exception handling? Explain with a program.

115.What is meant by inheritance?

116.Give the syntax for inheritance.
117.What are the types of inheritance?
118.Define single inheritance.
119.Define multi-level inheritance.
120.Define multiple inheritances.
121.Define Hierarchical inheritance.
122.Define Hybrid inheritance.
123.What is a virtual base class?
124.What is an abstract class?
125.Define Polymorphism?
126.What are the types of polymorphism?
127.Define ‘this’ pointer.
128.What is a virtual function?
129.What is a pure virtual function?
130.How can a private member be made inheritable?
131.What do you mean by inline function?
132.What are virtual classes?
133.Difference between realloc () and free?
134.What is RTTI? What are its practical uses?
135.How can typeid operator be used to find the type of a particular object?
136.What is dynamic casting?
137.What is cross casting?
138.What is down casting?
139.What are the advantages of inheritance?
140.What are polymorphic objects?
141.What is role of typeid operator in RTTI?

142.What are the different forms of inheritance supported in c++? Explain with an example.
143.Discuss on the visibility of base class members in privately and publicly inherited classes.
144.Explain in detail about virtual base class with an example.
145.Explain in detail about multiple inheritance with an example.
146.Explain how pure virtual function is implemented.
147.What are abstract classes? Give an example (with the program) to illustrate the use of abstract classes.
148.Explain in detail about Virtual function with example.
149.Explain about Exceptions Handlers and Standard Exceptions.
150.When working with templates do we need to use RTTI? Explain with example.
151.Discuss in detail about Dynamic Casting.

152.What are streams? Why they are useful?
153.What are input and output streams?
154.Briefly describe the class hierarchy provided by c++ for stream handling.
155.What is the difference between a text file and a binary file?
156.How can a file be opened for both reading and writing?
157.Describe the following manipulators setw (), setprecision (),setfill (),
Setiosflags (),resetiosflags ().
158.What is a file pointer?
159.What is a command-line argument?
160.How will you create manipulators?
161.Write the syntax and use of getline () and write () functions.
162.What are the differences between manipulators and ios functions?
163.What is the need for string objects?
164.Compare C strings with C++ strings.
165.What is meant by object serialization?
166.What is name conflict problem? How can it be solved using namespaces?
167.How can we define our own namespace?
168.How can we define our functions inside the namespace and use them outside?
169.What is unnamed namespace? What is the use of unnamed namespace?
170.How can we extend a namespace already defined? What is its advantage?
171.What is std namespace? How it is different from other namespaces?
172.What is STL? How it is different from C++ standard library?
173.List the three types of containers.
174.What is the major difference between sequence container and an associative container?
175.What is an iterator? What are the characteristics?
176.Explain how sequence iterators work.
177.Explain how sorted associative containers work.
178.How are the STL algorithms implemented?
179.Distinguish between the following:
a. Lists and vectors
b. Sets and maps
c.Maps and multimaps
d.Queue and deque
e.Arrays and vectors

180.Discuss about C++ Stream classes hierarchy.
181.Write notes on Formatted and Unformatted Console I/O Operations.
182.Explain about File Pointers and their manipulations with example.
183.Give the differences between Manipulators and ios Functions.
184.How can we determine errors while dealing with files.
185.Explain in detail about the facilities available for substring operations on the string object?
186.Explain in detail about Sorted Associative Containers.
187.Discuss about different ways of defining namespaces.
188.Explain in detail about Adapted Containers.

189. Define an examiner class. Provide all necessary data and function members to provide the following: The examiner must access answer sheets of at least one subject; He may examine answer sheets of multiple subjects; The examiner represents a college and also a university; Most of the examiners are local and represent local university; and have more than one constructor including one default and one with default argument. Provide a meaningful copy constructor.