Date 27/052/2025
SRN
5th Semester B.Tech (CSE) Semester End Examination May 2025
Course Title: Object Oriented Programming with C++
Course Code: B20EFS512 - 85584
Duration: 3 Hours Max. Marks: 100
Note:
1. Answer ONE FULL question from each unit.
2. Verify and ensure that question paper is completely printed before answering the question paper.
3. Any queries/discrepancies regarding the question paper, must be brought to the notice of the invigilator
4. Students must check the course title and course code before answering the question paper
UNIT – I Marks CO PO Bl
1. a) Discuss the important principles of object oriented programming in C++ with 8 1 1 to 5, 9 3
real time examples. , 10
b) Declare a class called PERSON with data members as name, age, gender, 10 1 1 to 5, 9 3
address and member function to read and display the data. Write a C++ , 10
program to read and display the data of an employee
c) Create two functions “add” for two different data types. Make two functions 7 2 1 to 5, 9 2
one for adding two integers and other for adding two floats but having same , 10
name. Develop a C++ program to show the use of function overloading.
OR
2. a) Constructor is a member function of class where name of the constructor is 10 1 1 to 5, 9 2
same as class name. There are different types of constructor in C++. With a , 10
programming example explain the different types of constructor.
b) Variable is a name given to a memory location to store a value. With an 8 1 1 to 5, 9 2
example program explain the difference between normal variable and static , 10
variable.
c) Function which call by itself is call as recursive function. Develop a program to 7 1 1 to 5, 9 2
find Fibonacci series using recursive function , 10
UNIT – II
3. a) The array of type class contains the object of the class its individual elements. 10 1 1 to 5, 9 3
Thus, an array of class type is known as an array of objects. Consider class , 10
Employee with members name, age, designation, salary and member function
to read and print. Implement a C++ program to read a number of employees
from user/input device and read and print the details of n-Employees.
b) Give the general syntax of friend function. Implement a C++ program to 8 1, 1 to 5, 9 3
demonstrate and implement friend function. 2 , 10
c) Explain the uses of scope resolution operator. 7 6 1 to 5, 9 2
, 10
OR
4. a) Operator overloading is used to give additional meaning to an existing 10 2 1 to 5, 9 3
operator. Develop a program to find the sum of two complex numbers using , 10
binary operator overloading.
Page 1 of 2
b) The access to data members and member functions of a class can be 7 6 1 to 5, 9 2
controlled by using the following keywords: Public, Private, Protected. Explain , 10
in detail about access specifiers with an example program.
c) Implement the C++ program to calculate the volume of two square boxes and 8 1 1 to 5, 9 3
print the volume by using Pointer to objects. , 10
UNIT – III
5. a) Create a class called STUDENT with data members USN, Name and age. Using 10 3 1 to 5, 9 3
simple inheritance, create a class UGSTUDENT having fields as Semester, Fees , 10, 11
and Stipend. Implement a C++ program to read and print student information.
b) Write a C++ program to create a class “PERSON” with data members name 10 3 1 to 5, 9 3
and gender. Create a class STUDENT from PERSON with members SRN and , 10, 11
Branch name. Create new class EMPLOYEE from PERSON with data member
company name, designation and salary.
With suitable inheritance read and display the details of STUDENT and
EMPLOYEE.
c) Write a short note on virtual base class. 5 5 1 to 5, 9 2
, 10
OR
6. a) Create Base Class called BANK having members: BankName and Address. 10 3 1 to 5, 9 3
Create a derived class Called ACCOUNT having members: AccountName, , 10,
Accountnumber and balance. Write a C++ program to read and print 111,2,3,
employee information using Multilevel Inheritance. 4 5, 9 ,
10, 11
b) Constructors are used to initialize variables of object and destructor is used to 7 1, 1 to 5, 9 3
destroy the object. With a suitable example show the sequence of execution 3 , 10, 11
of constructor and destructor using multiple inheritance.
c) With suitable example, explain virtual function and pure virtual functions. 8 5 1 to 5, 9 3
, 10
UNIT – IV
7. a) Write a C++ program that have a template function that would search for a 10 4 1 to 5, 9 3
key element in an array of any type. , 10, 11
b) List out the advantages of exception handling. Explain multiple catch 8 4 1 to 5, 9 3
statements with an example. , 10, 11
c) Dvelop a C++ program that would show how an exception handler can rethrow 7 4 1 to 5, 9 3
an exception , 10, 11
OR
8. a) Explain the fundamentals of exception handling. Write a C++ program that 10 4 1 to 5, 9 3
illustrates exception handling with the help of keywords try, throw and catch. , 10, 11
b) Implement a C++ program to demonstrate a class template with multiple 8 4 1 to 5, 9 3
parameters. , 10, 11
c) With an example, explain derived class exception. 7 3, 1 to 5, 9 3
4 , 10, 11
***
Page 2 of 2