Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Total No. of Questions : 8] SEAT No.

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

ic-
[6002]-119

tat
9s
S.E. (E & TC/Electronics & Computer)

6:3
02 91
OBJECT ORIENTED PROGRAMMING

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

31
9/0 13
0
Time : 2½ Hours] [Max. Marks : 70

om
7/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
80

rsic-238
.c
2) Neat diagrams must be drawn wherever necessary.
C

3) Figures to the right side indicate full marks.


16

tat
4) Use of calculator is allowed.
8.2

es
5) Assume Suitable data if necessary.

:39
.24

:36p
02P 91
49

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

the friend function? [6]


31
9/0 n13

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


P0
7/2

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


8 0 io
.23 tG

operators. [6]
CE

OR
s

38
ue

c-2
Q2) a) What is operator overloading? Why it is necessary to overload an
operator? [6] i
16

tat
Q
8.2

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


9s
.24

6:3

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


PU

91

[6]
49

0:3
30
31
SP

01

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


02

it in Multiple base classes. [6]


7/2
GP

b) What is containment? Explain with the help of String, Date and


9/0

Employee class. Objects of Date and String classes are data members
CE
80

of Employee Class. [6]


.23

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


16

inheritance? Give an example of each. [5]


8.2

OR
.24
49

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

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

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

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

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

6:3
be overcome. Explain with example. [5]

02 91
0:3
0
31
Q5) a)
9/0 13
Explain exception handling mechanism in C++? Write a program in
0
C++ to handle divide by zero exception? [6]

om
7/2
.23 GP

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


C++. [6]
E
80

rsic-238
.c
C

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


OR
16

tat
8.2

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

:39
.24

b) :36p
Write a C++ program using function template to find the product of
02P 91
49

0a
two integer or floating-point type of data. [6]
0
31

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


9/0 n13

require user defined exceptions. [6]


P0
7/2
8 0 io
.23 tG

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

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

c-2
b) Explain the role of seekg(), seekp(), tellg(), tellp(), function in the
i
16

tat
process of random access in a file. [5]
Q
8.2

9s

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

6:3
PU

[6]
91
49

0:3

OR
30
31
SP

Q8) a) Write a program using put() to write characters to a file until user
01
02

enters a dollar sign. [6]


7/2
GP

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


9/0

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


CE
80

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


.23
16
8.2


.24
49

[6002]-119 2

You might also like