Object-Oriented Programming (OOP) SPPU Endsem Question Paper May 2025
All 8 questions from this SPPU endsem paper, as printed. Read them here or open the PDF.
- Subject code
- 204194
- Pattern
- 2019 pattern
- Exam
- Endsem
- Session
- May 2025
- Max. marks
- 70
- Time
- 2½ Hours
- Semester
- IV
- Paper code
- [6402]-29
Printed for: S.E.( Electronics/E & T . C / Electronic and Computer Eng . /Electronics
Instructions to the candidates
- Answer Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
- Neat diagrams must be drawn wherever necessary.
- Figures to the right indicate full marks.
- Use of Calculator is allowed.
- Assume suitable data, if necessary.
Questions
Q1
- a)[6]
What is a friend function? What are the merits and demerits of using the friend function?
- b)[6]
- c)[6]
What is operator overloading? Write steps to overload Pre and Post increment operators.
OR- a)
Q2
Q3
- a)[6]
What is inheritance? How to inherit a base class as Publicly? Explain it in Multiple base classes.
- b)[6]
What is containment? Explain with the help of String, Date and Employee class. Objects of Date and String classes are data members of Employee class.
- c)[5]
What does inheritance mean in C++? What are different forms of inheritance? Give an example of each. 2
OR- a)
Q4
- a)[6]
Write a C++ program demonstrating use of the pure virtual function with the use of base and derived classes.
- b)[6]
Discuss the role of access specifiers in inheritance and show their visibility when they are inherited as public, private and protected.
- c)[5]
What is the ambiguity that arises in multiple inheritance? How it can be overcome. Explain with example.
- a)
Q5
ORQ6
- a)[6]
Explain Namespace and merits in C++ with example?
- b)[6]
Write a C++ program using function template to swap two integers, floating- point types and character data.
- c)[6]
What is user defined exceptions? Write down the scenario where we require user defined exceptions.
- a)
Q7
- a)[6]
Write a program using the open (), eof () and getline () member function to open and read a file content line by line.
- b)[5]
Explain the role of seekg (), seekp (), tellg (), tellp (), function in the process of random access in a file.
- c)[6]
OR- a)
Q8