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]


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]