Enrollment No. ...........
MID TERM EXAMINATION
Third Semester (BCA) NOV 2024
Paper Code: BCA 205
Subject: Object Oriented Programming with C++
Time: 2 Hours
Maximum Marks: 60
Instructions: Attempt five questions in all. Question No. 1 is compulsory. Attempt any 3 from the remaining questions. Each question carries 15 marks.
Q1. Attempt any 5 questions. Each question carries 3 marks. [15]
- (a) What do you mean by Function Overloading and Function Overriding?
- (b) List the differences between Function Overloading and Function Overriding.
- (c) What do you mean by Abstract base class? Explain with suitable code.
- (d) What is the advantage of using the 'protected' keyword?
- (e) What do you mean by Inline functions? Explain the advantage and disadvantage for the same.
- (f) Difference between Composition and Classification hierarchy.
- (g) Differentiate between Procedural and Object-oriented programming approaches.
Q2. (a) Differentiate between Inline functions and Macro. Write suitable code to explain the concept. [10]
(b) Compare Virtual base class with the Virtual function. Write suitable code to explain the concept. [5]
Q3. (a) Explain Nested Classes with suitable example. [10]
(b) Design a class that overloads the binary < operator to compare two user-defined objects representing eggs. This should return True if one egg is less than the other and False otherwise. [5]
Q4. (a) Explain Reference variable with a suitable example. What is the principal reason of passing arguments by reference? [10]
(b) Differentiate between passing arguments by reference and passing arguments by value. Explain with C++ program. [5]