Skip to content
EndsemMay 20252019 patternSE E&TC

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

  1. Answer Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
  2. Neat diagrams must be drawn wherever necessary.
  3. Figures to the right indicate full marks.
  4. Use of Calculator is allowed.
  5. Assume suitable data, if necessary.

Questions

  1. Q1

    1. a)

      What is a friend function? What are the merits and demerits of using the friend function?

      [6]
    2. b)

      Give a programming example that overloads = = operator with its use.

      Also asked:Dec 2025 ·May 2024

      [6]
    3. c)

      What is operator overloading? Write steps to overload Pre and Post increment operators.

      [6]
  2. Q2

    1. a)

      What is operator overloading? Why it is necessary to overload an operator?

      Also asked:Dec 2025 ·May 2024

      [6]
    2. b)

      Write a program to demonstrate friend function in C++.

      Also asked:Dec 2025 ·May 2024

      [6]
    3. c)

      What are the rules for overloading operators?

      Also asked:Dec 2025 ·May 2024

      [6]
  3. Q3

    1. a)

      What is inheritance? How to inherit a base class as Publicly? Explain it in Multiple base classes.

      [6]
    2. b)

      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.

      [6]
    3. c)

      What does inheritance mean in C++? What are different forms of inheritance? Give an example of each. 2

      Also asked:Dec 2025 ·May 2024

      [5]
  4. Q4

    1. a)

      Write a C++ program demonstrating use of the pure virtual function with the use of base and derived classes.

      Also asked:Dec 2025 ·May 2024

      [6]
    2. b)

      Discuss the role of access specifiers in inheritance and show their visibility when they are inherited as public, private and protected.

      Also asked:Dec 2025 ·May 2024

      [6]
    3. c)

      What is the ambiguity that arises in multiple inheritance? How it can be overcome. Explain with example.

      Also asked:Dec 2025 ·May 2024

      [5]
  5. Q5

    1. a)

      Explain exception handling mechanism in C++? Write a program in C++ to handle array index out of bound exception?

      [6]
    2. b)

      Explain class template using multiple parameters? Write a program in C++.

      Also asked:Dec 2025 ·May 2024

      [6]
    3. c)

      What is stream? Explain types of streams available in C++?

      Also asked:Dec 2025 ·May 2024

      [6]
  6. Q6

    1. a)

      Explain Namespace and merits in C++ with example?

      [6]
    2. b)

      Write a C++ program using function template to swap two integers, floating- point types and character data.

      Also asked:Dec 2025 ·May 2024

      [6]
    3. c)

      What is user defined exceptions? Write down the scenario where we require user defined exceptions.

      Also asked:Dec 2025 ·May 2024

      [6]
  7. Q7

    1. a)

      Write a program using the open (), eof () and getline () member function to open and read a file content line by line.

      Also asked:Dec 2025 ·May 2024

      [6]
    2. b)

      Explain the role of seekg (), seekp (), tellg (), tellp (), function in the process of random access in a file.

      Also asked:Dec 2025 ·May 2024

      [5]
    3. c)

      What is file mode? Explain any four file modes supported by C++.

      Also asked:Dec 2025 ·May 2024

      [6]
  8. Q8

    1. a)

      Write a program using put () to write characters to a file until user enters a # sign.

      Also asked:Dec 2025 ·May 2024

      [6]
    2. b)

      What is the difference between opening a file with constructor function and opening a file with open () function.

      Also asked:Dec 2025 ·May 2024

      [5]
    3. c)

      Explain error handling during file operation. 

      Also asked:Dec 2025 ·May 2024

      [6]