Be - Artificial Intelligence and Data Science - Semester 3 - 2023 - November - Object Oriented Programming Oop Pattern 2019
Be - Artificial Intelligence and Data Science - Semester 3 - 2023 - November - Object Oriented Programming Oop Pattern 2019
8
23
P9116 [Total No. of Pages : 2
ic-
[6179]-242
tat
S.E. (Computer / Computer Science & Design Engg./A.I&D.S.)
6s
OBJECT ORIENTED PROGRAMMING
8:2
02 91
9:3
(2019 Pattern) (Semester-III) (210243)
0
40
1/0 13
0
Time : 2½ Hours] [Max. Marks : 70
1/2
.23 GP
8
2) Neat diagrams must be drawn wherever necessary.
C
23
3) Assume suitable data if necessary.
ic-
4) Use of Calculator is allowed.
16
tat
8.2
6s
Q1) a) Differentiate between compile time polymorphism and run time
.24
polymorphism. [5]
8:2
91
b) How do you declare and define a pure virtual function in C++? Explain
49
9:3
with help of a program. [6]
30
40
c) Write a C++ program for unary increment (++) and decrement (--)
01
02
OR
GP
1/0
8
23
b) How virtual functions are implemented in C++? Explain with help of a
.23
program. [6]
ic-
16
tat
c) Write a program to binary (+) and binary (-) operator in C++. [6]
8.2
6s
.24
8:2
b) Explain the following file handling functions (solve any three). [6]
01
02
i) seekg ( )
1/2
GP
ii) tellg ( )
1/0
iii) seekp ( )
CE
80
iv) tellp ( )
c) Write a program Using the C++ file input and output class with open(),
.23
file. Use append mode while opening the file for writing. [7]
8.2
OR
.24
P.T.O.
49
Q4) a) List and Explain different Mode bits used in open () function, while
8
23
opening a file. (Any five). [5]
ic-
b) Define a class Person that has three attributes viz name, gender and age.
tat
Write a C++ Program that writes an object to a file and reads an object
6s
from a file. [6]
c) Explain what is fstream, ifstream and ofstream with help of example?
8:2
02 91
Provide the hierarchy of stream classes in C++. [7]
9:3
0
40
Q5) a) 1/0 13
Discuss exception handling mechanism in C++ with syntax. [5]
b) Write a program to handle exception using class type exception. [6]
0
1/2
.23 GP
8
C
23
b) Write a program to demonstrate class template with example. [6]
ic-
c) Demonstrate overloading function template with suitable code in C++.[6]
16
tat
8.2
6s
Q7) a) What is an iterator? Explain how to use an iterator in C++ program with
.24
8:2
example. [5]
91
49
in detail. [6]
40
OR
1/2
GP
Q8) a) What is STL? Enlist and explain in short major components of STL. [5]
1/0
b) What is iterator and algorithm? Explain each of them with example. [6]
CE
80
8
23
C++ program. [7]
.23
ic-
16
tat
8.2
6s
.24
8:2
91
49
9:3
30
40
01
02
1/2
GP
1/0
CE
80
.23
16
8.2
.24
[6179]-242 2
49