0% found this document useful (0 votes)
8 views

Opps

Uploaded by

maneomkar2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Opps

Uploaded by

maneomkar2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Department of Artificial Intelligence and Data Science

Object Oriented Programming


Question Bank

Unit 3 Inheritance and Pointers

Q. No. Bloom’s CO PO PSO


Questions
Taxonomy
1 Explain Inheritance. What is derived Remember
and base class with syntax. Understand
2 List Down all access specifiers. Remember
3 List Down types of inheritance. Remember
4 Explain Single Inheritance with
Remember
diagram.
5 Explain Multilevel Inheritance with
Remember
diagram.
6 Explain Derived Class constructor &
destructor concept along with order of Understand
calling.
7 Explain Difference between
Understand
Hierarchical & Hybrid Inheritance.
8 Define Function Overriding & Explain Remember
it’s requirement Understand
9 Explain Virtual Base Class with an Remember
example. Understand
10 Define Friend Class & give it’s syntax. Understand
11 Explain the concept of nested class with
Understand
an example.
12 Explain the concept of Friend class with
Understand
an example.
13 Define Pointer with syntax. Remember
305.1
14 What is the reference and dereference Understand
operator explain with an example.
15 How we can do memory management Understand
using operators & give syntax of new
and delete operator.
16 Give Difference between Array & Remember
Pointers.
17 Explain ‘this’ pointer with an example. Apply
18 What is Pointer to Object exp[lain with Apply
an example.Also give syntax.
19 Write a C++ program to print all array Apply
element using pointers.
20 Write a C++ program to implement the Apply
concept of pointer to function.

Unit 4 : Polymorphism

Q. No. Bloom’s CO PO PSO


Questions
Taxonomy
1 Define polymorphism and explain its
Remember
significance in object oriented
Understand
programming.
2 What are the types of polymorphism ?
Define each with the help of an Remember
example.
3 Explain how unary operators can be
overloaded. Provide an example of
Remember
overloading the unary operator ‘-’ in a
class.
4 Explain how binary operators can be
overloaded. Provide an example of
Remember
overloading the unary operator ‘+’ in a
class.
5 How is polymorphism achieved ?
Understand
At (a) compile time (b) run time
6 Why is it necessary to overload an
Understand
operator ?
7 Define virtual destructor. Write the
Remember
syntax for declaring a pure virtual
Understand
function in C++ abstract base class.
8 Differentiate between implicit and Remember
explicit type casting. Understand
9 Explain virtual destructor and its
Understand 305.4
significance.
10 What is the purpose of the ‘explicit’
Remember
keyword in C++?
11 In which scenarios it is appropriate to
Remember
use ‘mutable’ keyword in C
12 How is casting from a string to numeric Understand
data type performed ?
13 What are the pitfalls of operator Remember
overloading and conversion ?
14 How do we achieve function Remember
overloading? On what basis, the Understand
compiler distinguishes between a set of
overloaded functions having the same
name?
15 What is a virtual function ? Why do we Understand
need virtual functions ? Explain its
significance in C++.
16 When do we make a virtual function Understand
“pure” and what are the implications of
making a function pure virtual function
?
17 Provide a data conversion example in Apply
C++
18 Create a base class called shape. Use Apply
this class to store two double type
values that could be used to compute
the area of figures. Derive two specific
classes called triangle and rectangle
from the base shape. Add to the base
class, a member function get_data() to
initialize the base class data members
and another member function
display_area() to display the area of
figures. Make display_area() as a
virtual function and redefine this
function in the derived classes to suit
their requirements.
19 Provide real world scenarios where Apply
polymorphism is beneficial.
Unit 5 : File Streams

Q. No. Bloom’s CO PO PSO


Questions
Taxonomy
1 What are the various functions which Remember
are used to manipulate file pointers ? Understand
2 What are the steps involved in using a
Remember
file in C++ program?
3 Describe the various classes available
Remember
for operation ?
4 What is a file mode? Describe the
Remember
various file mode operations available.
5 List the error handling functions used
Remember
during file operation ?
6 What is the difference between opening
a file with a constructor function and
opening a file with open() function ? Understand
When is one method preferred over the
other ?
7 Explain command line argument in
arguments in C++. Write a program to Understand
explain the same.
8 Explain error handling in file I/O with Remember
suitable programs. Understand
9 Explain overloading the extraction and Remember
insertion operators using an example. Understand
10 Explain Data Hierarachy. Understand
11 What is buffered and unbuffered 305.1
Understand
standard error stream ?
12 What is stream and its types ? Understand
13 What are command line arguments in
C++? Write a program that returns size
Remember
in bytes of a file provided as command
line argument.
14 Define stream. Explain types of stream Understand
available in c++.
15 Write a program using open(), eof(), Understand
and getline() member functions to open
and read a file context line by line.
Unit 6 : Exception Handling and Templates

Q. No. Bloom’s CO PO PSO


Questions
Taxonomy
1 Write a C++ program to implement
Remember
class template with multiple
Understand
parameters.
2 List Down reasons of Exceptions. Remember
3 Why do we need Templates in C++? Remember
4 Give syntax of try and catch block? Remember
5 Explain with an example why templates
Understand
are used in programming?
6 Distinguished between class template
Understand
and template class
7 What is Exception ? What is the need of Remember
Exception Handling ? Understand
8 Explain Exception Handling Remember
mechanism in C++? Understand
9 What is Generic Programming and how
Understand
it is implemented in C++?
10 What are the advantages of using
exception handling mechanism in a Remember
program?
11 What is function template and give it’s
Remember
syntax?
12 Distinguished between Function Understand
Overloading and Function Template
13 Explain how exception is handled in Remember 305.6
case of constructor & destructor
14 Write a C++ program to implement Remember
Multiple Catching: Understand
Case 1 : First number is not smaller
than second and second number is not
zero No exception divide as it is.
Case 2 : Second number is zero throw
exception divide by zero.
Case 3 : first number is smaller than
second number throw exception and
divide and return result in float.
15 What is Template ? Write a program to Apply
handle addition of two numbers using
template.
16 Write a C++ program to handle “Divide Understand
By Zero” exception using try & catch
block.

You might also like