KEMBAR78
Final OOP QB 2019 Pattern | PDF | C++ | Pointer (Computer Programming)
0% found this document useful (0 votes)
84 views5 pages

Final OOP QB 2019 Pattern

This document provides a question bank for an Object Oriented Programming final exam organized into four units: Introduction to OOP, Inheritance and Pointers, Polymorphism, and Files and Streams. It includes 25 questions in the first unit, 28 questions in the second unit, 11 questions in the third unit, and 4 questions in the fourth unit, for a total of 68 questions. Each question includes the number of marks allotted. The questions cover key OOP concepts like classes, objects, inheritance, polymorphism, operator overloading, file I/O, and more.

Uploaded by

Rqji
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)
84 views5 pages

Final OOP QB 2019 Pattern

This document provides a question bank for an Object Oriented Programming final exam organized into four units: Introduction to OOP, Inheritance and Pointers, Polymorphism, and Files and Streams. It includes 25 questions in the first unit, 28 questions in the second unit, 11 questions in the third unit, and 4 questions in the fourth unit, for a total of 68 questions. Each question includes the number of marks allotted. The questions cover key OOP concepts like classes, objects, inheritance, polymorphism, operator overloading, file I/O, and more.

Uploaded by

Rqji
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/ 5

OOP Question Bank for Final Theory Exam (2019- Pattern)

Unit I :: Introduction to Object Oriented


Programming

Sr. BL Questions Marks


No
1 4 When would you choose to use C rather than C++? 4
2 1 List the features of Object oriented programming and Explain 3/6/8
3 2 What is Constructor and Destructor, explain using program 4/6/8
4 2 What is class and object. Differentiate between class and object 2/4/6
5 1 What is class abstraction 2/4
6 3 Write a program which uses default constructor, parameterized constructor and 6
destructor.
7 2 Compare 1) Procedure oriented programming Vs Object 4 /8
oriented programming
8 2 What is the use of ‘this’ pointer. Explain with Example 2/3/4
9 2 Compare and contrast dynamic memory allocation and deallocation 2/4/6/8
operators new, new [], delete and delete [].
10 3 Define class Number which has inline function mult ( ) and cube () for 4/6
calculating the multiplication of 2 double numbers given and cube of the integer
number given
11 1 Explain information hiding in C++. 2
12 3 Consider the following declaration : 8
class TRAIN{ int trainno;
char dest[20]; float
distance;
public:void get( ); //To read an object from the keyboardvoid put( ); //To
write an object into a file
void show( ); //To display the file contents on the monitor};Complete
the member functions definition

13 1 Explain the significance of Static keyword in programming 4


14 1 Explain static variables and static member function in C++using program 4/6/8

15 2 What is difference between pointer and references? 4


16 3 What are inline functions? What are their advantages ?Explain 3/5/6
with suitable program
17 1 What are primitive data types and User defined data types ? 3
18 2 Define Constructor, Destructor. Write a program to explain the 6
use of new, delete, constructor and destructor
19 2 Explain Structure, Union and Enumeration Data Type with Syntax and Example 3/6
20 1 Explain public, private and protected keywords using program 3/6
21 3 Define a class named „Bank Account‟ to represent following members: 5/6/8
Data members :- - Account Number - Name of Depositor - Account Type -
Balance Amount Member functions: - Initialize members - Deposit Amount
- Withdraw Amount - Display Balance Write a C++ program to test the
Bank Account class for 10 customers.
22 3 Create a class which keeps track of the number of instances and also assigns 5/6/8
unique identification to them. Use static data member and constructor to
maintain updated information.
23 2 Define inline function. Write a C++ program for finding the area of a triangle 4/6/7
using inline functions.

24 2 What are the different ways to define member functions of a class? Give 4
Examples of Each

25 3 Write C++ code that defines a class and declares an array of objects to that 5/6/7
class

Unit-II :: Inheritance and Pointers

Sr. BL Questions Marks


No
1 2 Explain friend function with example. 2/4/6
2 2 Explain public, private and protected keywords using program 3/6
3 1 What are types of inheritance. Explain them 5/6/8
4 3 What are nested classes, how to access the members of 2/4/6/8
nested classes. Explain using example
5 1 Write short notes on type of inheritance with respect 3/6
to(i) Single(ii) Multiple(iii) Hierarchical
6 1 Explain the visibility modes in Inheritance. 3/6
7 3 What is Multiple Inheritance? What is ambiguity in Multiple 3/5/6/8
Inheritance? Give suitable example to demonstrate
MultipleInheritance.
8 3 What is the difference between Inheritance and 6
Containment? Write a program in C++ to defend your
answer
9 4 Discuss the various ways in which inheritance promotes software 4/5
reuse, saves time during program development and
helps prevent errors.
10 2 Define Base Class and Derived Class with Example 2/4/6
11 2 Explain derivation modes in C++ and their effect in Inheritance OR Discuss 4/6
the role of access specifiers in inheritance and show their visibility when they
are inherited as public, private and protected.
12 2 With the help of a program explain how Constructors 4/6/8
and Destructors behave in Inheritance in C++
13 1 Write short note on Local Class 4
14 2 Explain : Virtual base class with the help of program 4
15 1 Explain the void and null pointer 2/4/6
16 2 What is „this‟ pointer? Explain with example 2/4
17 2 What is the significance of friend class. Explain using program 4/6/8
18 3 Write a program to Find the sum of an array Arr by passing 4/6
an array to a function using pointer
19 2 Compare and Contrast memory allocation and 4/6/8
deallocation using new and delete
20 3 How are arrays represented using Pointers. Write a program 2/4/6/8
to demonstrate the same.
21 4 2 How do we return pointers to a function. Explain with an 2/5/6
example.
22 2 4 Discuss the issue which arises for segmentation fault in case of 4/6/8
returning function to pointers and explain with the help of a
program how to resolve it.
23 4 2 What is the concept of function pointers? Give suitable example in 4/5/6/8
C++
24 1,5 2 What is dynamic memory allocation? Explain its use in C++ 6
with suitable example
25 1 2 Explain various arithmetic pointer operations. 4/6
26 4 2 Explain pointer to a variable and pointer to a function. Use 4
suitable example
27 4 2 Write a C++ program to demonstrate pointers to base and 6/7
derived classes
28

Unit-III:: Polymorphism

Sr. BL Questions Marks


No
1 1 Explain Polymorphism and Types of Polymorphism. 2/4
2 2 When do we overload the functions and when do we override 3/6
3 1 Explain Function overloading and operator overloading 4/6
3 Write a program to overload unary operator using friend 6/8
4
functions.
3 Write a program to overload binary operator using 6/8
5
friend functions.
1 Explain what is type casting, Implicit type casting and 6
6
explicit type casting
3 Define a class string and use overloaded == operator to 6/8
7
compare two strings.
Write a program to overload insertion (<<) and extraction (>>) 6/8
8 3
operator in C++
Explain need of operator overloading. Write C++ program to 6/8
9 3
demonstrate use of unary operator overloading
10 1 What are virtual functions 4/6/8
11 1 Explain Virtual destructor 4/6
12 3 Explain virtual base class and virtual function with example 6/8
Unit-IV :: Files and Streams

Sr. BL Questions Marks


No
1 1 What is a Stream? explain types of Streams available in C++ 3/6
2 1 What are cin and cout ? explain iostream. 3/6
What are file pointers? explain various function used in file
3 1 4/8
pointers
Explain what is fstream, ifstream and ofstream with help of
4 2 6/8
example
What are various functions which are used to manipulate file
5 2 6/8
pointers. Explain using examples.
6 1 What are stream errors, flags for setting and getting an error 4
Explain Command line arguments in C++. Write program to
7 3 3/6/8
explain the same
Write a program to overload insertion (<<) and extraction(>>)
8 3 6/8
operator in C++
Write a program Using the C++ file input and output class with 6/8
9 3 open(), get(), close() etc methods for opening, reading from and
writing to a file
Write a The C++ file input and output program: using seekg(), 6/8
10 3
tellg(), read() etc member functions.
Write a program using the open(), eof() and getline() member 6/8
11 3
functions to open and read a file content line by line

OOP Question Bank for Final Theory


Exam (2019- Pattern)

Unit-V :: Exception Handling and Templates

Sr. BL Questions Marks


No
1 2 What is generic programming? How it is implemented in C++ 3/6
2 3 Explain What is Function template and Class template using 3/6
program
3 1 What Is exceptional handling 4/8
4 1 Explain try, catch and throw mechanism of C++ exception
al handling 6
5 1 What is stack unwinding 4
6 Explain class template using multiple parameters. Write
3 4/6/8
a program in C++
7 Explain exception handling mechanism in C++? Write a
3 4/6/8
program in C++ to handle “divide by zero” exception.
8 1 What do you mean by rethrowing exceptions 3/6
OOP Question Bank for Final Theory
Exam (2019- Pattern)

Unit-VI::Standard Template Library

Sr. BL Questions Marks


No
1 1 What is STL ? list different types of STL containers. 4/5/6
2 2 What is a stack ? How it is implemented using STL 4/8
3 1 What is an iterator ? what are types of Iterators 4/6
4 3 Write a program to implement Map using STL 6/8
5 3 What is container? List the container classes in C++. Explain any
2/4/6/8
one of them using program
6 3 Use minimum 8 functions of vector STL. Write a program to
explain the same 6/8
7 3 Use minimum 8 functions of Deque STL. Write a program to
6/8
explain the same
8 2 What is the STL? Why should a C++ programmer be interested in
the STL? What is the design philosophy of the STL? What are 6/8
the major components of the STL?
9 3 Write a program to implement Map using STL
6/8

10 3 Use minimum 8 functions of vector STL. Write a program to


6/8
explain the same
11 3 What is the purpose of Iterator? Elaborate forward,
5/7/8
bidirectional and random-access iterators with suitable
examples
12 2 Compare associative containers Vs Sequence Containers Vs
6/8
Derived containers with example of each

You might also like