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

Be - Artificial Intelligence and Data Science - Semester 3 - 2023 - November - Object Oriented Programming Oop Pattern 2019

Uploaded by

manaswii5201
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Be - Artificial Intelligence and Data Science - Semester 3 - 2023 - November - Object Oriented Programming Oop Pattern 2019

Uploaded by

manaswii5201
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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
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

Instructions to the candidates:


1) Answer Q.No.1 or Q.No.2, Q.No.3 or Q.No.4, Q.No.5 or Q.No.6, Q.No.7 or Q.No.8.
E
80

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

operator overloading. [6]


1/2

OR
GP
1/0

Q2) a) What is operator overloading and why it is useful? Which Operators


CE

cannot be overloaded. [5]


80

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

Q3) a) Explain the use of command line arguments. If we want to pass


91
49

command line arguments what will be prototype of main function and


9:3
30

explain its arguments along with example. [5]


40

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

get(), put(),close() methods for opening, reading from and writing to a


16

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

c) Demonstrate function template with suitable code in C++. [6]


OR
E

Q6) a) Explain exception handling in constructor, destructor. [5]


80

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

b) What is an algorithm in STL? Enlist algorithms and explain any algorithm


9:3
30

in detail. [6]
40

c) What is a Map ? Write a program to implement map in C++. [7]


01
02

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

c) What is a vector? Enlist and explain any 5 functions of vector by using a

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

You might also like