Skip to content
EndsemMay 20242019 patternSE E&TC

Object-Oriented Programming (OOP) SPPU Endsem Question Paper May 2024

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 2024
Max. marks
70
Time
2½ Hours
Semester
IV
Paper code
[6261]-24

Printed for: S.E. (Electronics/E & TC) (Electronics & Computer Engineering)

Instructions to the candidates

  1. Attempt 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 operator overloading? Why it is necessary to overload an operator?

      Also asked:Dec 2025 ·May 2025

      [6]
    2. b)

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

      Also asked:Dec 2025 ·May 2025

      [6]
    3. c)

      What are the rules for overloading operators?

      Also asked:Dec 2025 ·May 2025

      [6]
  2. Q2

    1. a)

      Explain friend function with example?

      [6]
    2. b)

      What are the rules for overloading operators?

      Also asked:Dec 2025 ·May 2025

      [6]
    3. c)

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

      Also asked:Dec 2025 ·May 2025

      [6]
  3. Q3

    1. a)

      Explain virtual base class and virtual function with example.

      Also asked:Dec 2025

      [6]
    2. b)

      Discuss the ways in which inheritance promotes software reuse, saves time during program development and helps prevent errors.

      Also asked:Dec 2025

      [6]
    3. c)

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

      Also asked:Dec 2025 ·May 2025

      [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 2025

      [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 2025

      [6]
    3. c)

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

      Also asked:Dec 2025 ·May 2025

      [5]
  5. Q5

    1. a)

      Explain exception handling mechanism in C++? Write a program in C++ to handle divide by zero exception?

      Also asked:Dec 2025

      [6]
    2. b)

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

      Also asked:Dec 2025 ·May 2025

      [6]
    3. c)

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

      Also asked:Dec 2025 ·May 2025

      [6]
  6. Q6

    1. a)

      Explain Namespace in C++ with example.

      [6]
    2. b)

      Write a C++ program using function template to find the product of two integer or floating-point type of data.

      Also asked:Dec 2025 ·May 2025

      [6]
    3. c)

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

      Also asked:Dec 2025 ·May 2025

      [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 2025

      [6]
    2. b)

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

      Also asked:Dec 2025 ·May 2025

      [5]
    3. c)

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

      Also asked:Dec 2025 ·May 2025

      [6]
  8. Q8

    1. a)

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

      Also asked:Dec 2025 ·May 2025

      [6]
    2. b)

      Waht is the difference between opening a file with constructor function and opening a file with open ( ) function?

      Also asked:Dec 2025 ·May 2025

      [5]
    3. c)

      Explain erroe handling during file operation. 

      Also asked:Dec 2025 ·May 2025

      [6]