Optional Paper—1
Time : 3 Hours
Maximum Marks : 50
N.B. :— (1) All questions are compulsory and carry equal marks.
(2) Draw well labelled diagram wherever necessary.
EITHER
1. (A) What is inline member function ? How will you make a member function defined outside the class
as inline ? [5M]
(B) Write a syntax for accessing class members and write a program in C++ which shows member
function defined inside the body of the student class. [5M]
OR
(C) Explain access specifiers in C++ with example. [5M]
(D) What is static data members ? Write access rules for static data members and static member
functions. [5M]
EITHER
2. (A) What is constructor ? Explain the parameterized constructor with a suitable example. [5M]
(B) What is copy constructor ? Explain with example. [5M]
OR
(C) Write a program in C++ which shows the use of destructor. [5M]
(D) What is operator overloading ? Write a program in C++ to overload the unary operator
‘__ _’. [5M]
EITHER
3. (A) What are dynamic objects ? What is the difference between dynamic memory allocation and
dynamic objects ? [5M]
(B) What is ‘this’ pointer ? Write a program demonstrating the use of ‘this’ pointer. [5M]
OR
(C) What is inheritance ? Explain single inheritance with a suitable example. [5M]
(D) Write a program in C++ for multilevel inheritance. [5M]
EITHER
4. (A) What are virtual functions ? Give its advantages and write rules for it. [5M]
(B) What is Exception ? List all exceptions with its purpose. [5M]
OR
(C) Explain Abstract class with example. [5M]
(D) Write a program in C++ to handle division by zero exception. [5M]
5. Attempt all :
(A) Explain class and object with example. [2½M]
(B) Differentiate between constructor and destructor. [2½M]
(C) Draw a labelled diagram for hybrid inheritance and hierarchical inheritance. [2½M]
(D) Explain handling uncaught exceptions. [2½M]