0% found this document useful (0 votes)
13 views

Be Electronics and Telecommunication Engineering Semester 4 2023 November Object Oriented Programming Oop Pattern 2019

Uploaded by

omii86240
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Be Electronics and Telecommunication Engineering Semester 4 2023 November Object Oriented Programming Oop Pattern 2019

Uploaded by

omii86240
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Total No. of Questions : 8] SEAT No.

8
23
P-9099 [Total No. of Pages : 2

ic-
tat
[6179]-224

7s
S.E. (Electronics / Electronics & Computer/E&TC)

8:0
02 91
OBJECT ORIENTED PROGRAMMING

9:3
0
(2019 Pattern) (Semester - IV) (204194)

30
3/1 13
Time : 2½ Hours] [Max. Marks : 70
0
2/2
.23 GP

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.
E

2) Neat diagrams must be drawn wherever necessary.


82

8
C

23
3) Figures to the right indicate full marks.

ic-
4) Use of calculator is allowed.
16

5) Assume suitable data if necessary.

tat
8.2

7s
.24

Q1) a) What is a friend function? What are the merits and demerits of using the
8:0
91
friend function? [6]
49

9:3
30

b) What are the rules for overloading operators? [6]


30
01

c) Which is operator overloading? Write steps to overload << & >>


02

operators. [6]
2/2
GP
3/1

OR
CE
82

Q2) a) What is operator overloading? Why it is necessary to overload an

8
23
Operator? [6]
.23

ic-
16

b) Write a program to demonstrate friend function in C++. [6]


tat
8.2

7s

c) Give a programming example that overloads = = operator with its use.[6]


.24

8:0
91
49

9:3

Q3) a) What is inheritance? How to inherit a base class as protected? Explain it


30
30

in Multiple base classes. [6]


01
02

b) What is containment? Explain with the help of String. Date and Employee
2/2
GP

class. Objects of Date and String classes are data members of Employee
3/1

Class. [6]
CE
82

c) What does inheritance mean in C++? What are different forms of


inheritance? Give an example of each. [5]
.23
16

OR
8.2

P.T.O.
.24
49
Q4) a) Write a C++ program demonstrating use of the pure virtual function

8
23
with the use of base and derived classes. [6]

ic-
b) Discuss the role of access specifiers in inheritance and show their visibility

tat
when they are inherited as public, private and protected. [6]

7s
c) What is the ambiguity that arises in multiple inheritance? How it can be

8:0
02 91
overcome. Explain with example. [5]

9:3
0
30
Q5) a) 3/1 13
Explain exception handling mechanism in C++? Write a program in C++
0
to handle divide by zero exception?
2/2 [6]
.23 GP

b) Explain class template using multiple parameters? Write a program in


C++. [6]
E
82

8
C

23
c) What is stream? Explain types of streams available in C++? [6]

ic-
OR
16

tat
8.2

Q6) a) Explain Namespace in C++ with example? [6]

7s
.24

8:0
b) Write a C++ program using function template to find the product of two
91
49

integer or floating-point type of data. [6]


9:3
30

c) What is a user defined exception? Write down the scenario where we


30

require user defined exceptions. [6]


01
02
2/2
GP
3/1

Q7) a) Write a program using the open(), eof() and getline() member function
CE

to open and read a file content line by line. [6]


82

8
23
.23

b) Explain the role of seekg(), seekp(), tellg(),tellp(), function in the process


of random access in a file. ic-
[5]
16

tat
8.2

7s

c) What is file mode? Explain any four file modes supported by C++. [6]
.24

8:0

OR
91
49

9:3

Q8) a) Write a program using put() to write characters to a file until user enters
30
30

a dollar sign. [6]


01
02

b) What is the difference between opening a file with constructor function


2/2

and opening a file with open () function. [5]


GP
3/1

c) Explain error handling during file operation. [6]


CE
82
.23


16
8.2
.24

[6179]-224 2
49

You might also like