Ilovepdf Merged
Ilovepdf Merged
8
23
P627 [Total No. of Pages : 2
ic-
[5869]-249
tat
S.E. (Electronics / E & TC/Electronics & Computer)
0s
7:4
OBJECT ORIENTED PROGRAMMING (2019 Pattern)
02 91
8:3
(Semester - IV)
0
20
0/0 13
0
Time : 2½ Hours] [Max. Marks : 70
6/2
.23 GP
8
2) Neat diagrams must be drawn wherever necessary.
C
23
ic-
3) Figures to the right side indicate full marks.
16
tat
4) Use of calculator is allowed.
8.2
0s
5) Assume suitable data if necessary.
.24
7:4
91
Q1) a) What is operator overloading? Why it is necessary to overload an
49
8:3
operator? [6]
30
20
c) What is friend function? What are the merits & demerits of using the
0/0
8
OR
23
.23
ic-
Q2) a) What are the rules for over loading operators. [6]
16
tat
b) Which operators can not be overloaded? Write steps to overload +
8.2
0s
7:4
91
49
[6]
20
01
02
6/2
GP
Q3) a) Explain virtual base class & virtual function with example? [6]
0/0
OR
.24
49
P.T.O.
Q4) a) What is the ambiguity that arises in multiple inheritance? How it can be
8
23
overcome. Explain with example. [6]
ic-
b) What are types of inheritance? Explain in detail. [6]
tat
c) Discuss the role of access specifiers in inheritance and show their visibility
0s
when they are inherited as public, private protected. [6]
7:4
02 91
8:3
Q5) a) Write a C++ program involving a function template. [5]
0
20
b) 0/0 13
Explain exception handling mechanism in C++? Write a program in C++
to handle divide by zero exception. [7]
0
6/2
.23 GP
8
Q6) a) Explain class template using multiple parameters? Write a program in
C
23
C++. [7]
ic-
16
tat
8.2
0s
c) What is stream? Explain types of streams available in C++. [5]
.24
7:4
91
49
8:3
Q7) a) What is File mode? Explain any four modes supported by C++. [6]
30
20
OR
CE
83
8
23
Q8) a) Write a program using the open ( ), eof ( ) & getline ( ) functions to open
.23
tat
b) Explain file functions for text file and binary file operations. [7]
8.2
0s
.24
8:3
30
20
01
02
6/2
GP
0/0
CE
83
.23
16
8.2
.24
49
[5869]-249 2
Total No. of Questions : 8] SEAT No. :
8
23
PA-1235 [Total No. of Pages : 3
ic-
[5925]-257
tat
6s
S.E. (Computer/Artificial Intelligence & Data Science/
9:0
02 91
Computer Science & Design Engineering)
3:1
0
OBJECT ORIENTED PROGRAMMING
31
7/0 13
(2019 Pattern) (Semester - III) (210243)
0
2/2
.23 GP
8
Instructions to the candidates:
C
23
1) Attempt Q1 or Q2, Q3 or Q4, Q5 or Q6, Q7or Q8.
ic-
16
tat
8.2
6s
3) Neat diagrams must be drawn wherever necessary.
.24
9:0
4) Assume suitable data, if necessary.
91
49
3:1
30
31
Q1) a) Explain the polymorphism feature of OOP. What are the different ways
01
examples.
2/2
[5]
GP
for adding two complex numbers which are object of below complex
CE
80
8
23
class. [6]
.23
tat
{
8.2
6s
9:0
91
49
};
3:1
30
c) What is Pure virtual function? Illustrate the use of Pure virtual function.
31
01
[6]
02
2/2
OR
GP
7/0
[5]
b) What is function overloading? Write defination of three overloaded
.23
functions (add) which will add two integer, float and double numbers
16
respectively. [6]
8.2
P.T.O.
Q3) a) What are various functions used to manipulate file pointers? Explain
8
using example.
23
[7]
ic-
b) What are command line arguments in C++? Write a program to explain
tat
the same. [7]
6s
9:0
c) What are fstream, ifstream and ofstream? Illustrate with help of example.
02 91
3:1
[4]
0
31
7/0 13 OR
0
2/2
Q4) a) Write a program to create file, read and write record into it. Every
.23 GP
record contains employee name, id and salary. Store and retrieve atleast
E
3 data.
80
[7]
8
C
23
b) What do you mean by file handling? Explain the following functions.
ic-
16
tat
[7]
8.2
6s
i) open()
.24
9:0
91
49
3:1
ii) get()
30
31
iii) getline()
01
02
2/2
GP
8
23
.23
6s
9:0
91
[6]
49
3:1
30
[7]
01
02
OR
2/2
GP
[4]
CE
80
[6]
16
[5925]-257 2
Q7) a) What is purpose of iterator and algorithm. [4]
8
23
b) What is STL? List and explain different types of STL containers. [6]
ic-
tat
c) Write a program to implement map in STL. [8]
6s
OR
9:0
02 91
3:1
Q8) a) What are major components of STL. [4]
0
31
b) 7/0 13
State functions of vector STL. Write a program to explain the same.
0
2/2 [6]
.23 GP
c) What is container? List the container classes in C++. Explain any one
of them using program.
E
[8]
80
8
C
23
ic-
16
tat
8.2
6s
.24
9:0
91
49
3:1
30
31
01
02
2/2
GP
7/0
CE
80
8
23
.23
ic-
16
tat
8.2
6s
.24
9:0
91
49
3:1
30
31
01
02
2/2
GP
7/0
CE
80
.23
16
8.2
.24
49
[5925]-257 3
Total No. of Questions : 8] SEAT No. :
8
23
P1528 [Total No. of Pages : 2
[6002]-157
ic-
tat
S.E. (Computer Engineering) (Artificial Intelligence & Data Science)
2s
(Computer Science & Design Engineering)
4:4
OBJECT ORIENTED PROGRAMMING (OOP)
02 91
0:4
(2019 Pattern) (Semester - III) (Theory) (210243)
0
31
6/0 13
Time : 2½ Hours] [Max. Marks : 70
0
6/2
Instructions to the candidates:
.23 GP
8
3) Assume suitable data if necessary.
C
23
ic-
16
tat
Q1) a) What is runtime polymorphism? How it is achieved in C++. Explain it
8.2
2s
along with example. [5]
.24
4:4
b) Explain virtual base class and virtual function with example. [6]
91
49
0:4
c) Explain need of operator overloading. Write C++ program to
30
OR
01
02
8
c) Write a program to overload insertion (<<) and extraction (>>) operator
23
.23
in C++. [6]
ic-
16
tat
8.2
2s
Q3) a) What are various functions which are used to manipulate file pointers?
.24
0:4
same. [7]
30
31
OR
6/2
GP
Q4) a) Explain formatted and unformatted input and output functions used in
6/0
b) What are stream classes and their use? Provide the hierarchy of stream
classes in C++. [7]
.23
P.T.O.
49
8
23
Q5) a) What is the power of templates in C++? Explain along with one example.
ic-
[5]
tat
b) Explain exception handling mechanism in C++? Write a program in C++
2s
to handle “divide by zero” exception. [6]
4:4
c) Write a short note on typename and export keyword in C++. [6]
02 91
0:4
OR
0
31
Q6) a) What is mean by user defined exception? Give one example.
6/0 13 [5]
b) Explain class template using multiple parameters. Write a program in C++.
0
6/2
[6]
.23 GP
8
C
23
Q7) a) Explain the concept of the Standard Template Library (STL) in C++.
ic-
What are its key components? [7]
16
tat
b) Differentiate between sequence containers and associative containers in
8.2
2s
the STL. Provide examples of each. [7]
.24
4:4
91
c) Discuss the advantages of using container adapters in the STL. Provide
49
0:4
examples of container adapters. [4]
30
31
OR
01
02
Q8) a) How can vectors and lists be used as sequence containers in the STL?
6/2
GP
8
23
.23
c) Describe the process of using the STL algorithms for Quick sort. [4]
ic-
16
tat
8.2
2s
.24
4:4
91
49
0:4
30
31
01
02
6/2
GP
6/0
CE
81
.23
16
8.2
.24
[6002]-157 2
49
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
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
Total No. of Questions : 8] SEAT No. :
8
23
PB3635 [Total No. of Pages : 3
ic-
[6261]-42
tat
S.E. (Computer Engineering)/(Computer Science & Design
1s
Engineering)/(AI & DS)
7:3
OBJECT ORIENTED PROGRAMMING
02 91
3:3
(2019 Pattern) (Semester - III) (210243)
0
41
Time : 2½ Hours] 1/0 13 [Max. Marks : 70
Instructions to the candidates:
0
5/2
1) Answer Q.1 or Q.2, Q.3 or Q.4 Q.5 or Q.6, Q.7. or Q.8.
.23 GP
8
4) Figures of the rights indicate full marks.
C
23
ic-
Q1) a) Explain need of operator overloading. What are the rules to be followed
16
tat
when overloading an operator in C++? [5]
8.2
1s
b) How virtual functions are implemented in C++? Explain with help of a
.24
7:3
91
program. [6]
49
3:3
30
OR
GP
1/0
Q2) a) What is abstract base class in C++ polymorphism? Explain with program.
CE
82
[5]
8
23
.23
tat
8.2
1s
7:3
91
3:3
b) Explain the two ways in which files can be opened, open () and Using
CE
82
OR
.24
P.T.O.
49
[6261]-42 1
8
Q4) a) List and Explain different Mode bits used in open () function, while
23
opening a file. (Any five) [5]
ic-
tat
1s
b) Explain the command line argument in C++ Write a program to explain
7:3
the same. [6]
02 91
3:3
0
41
c) Which header file do we use for file handling? Explain the following file
1/0 13
handling functions [7]
0
5/2
.23 GP
i) seekg ( )
E
82
8
C
23
ii) tellg ( )
ic-
16
tat
iii) seekp ( )
8.2
1s
.24
7:3
iv) tellp ( )
91
49
3:3
30
41
01
02
C++. [5]
1/0
CE
82
8
b) What is template function? Explain with suitable example. [6]
23
.23
tat
in C++. [6]
8.2
1s
.24
7:3
91
OR
49
3:3
30
41
Q6) a) What do you mean by rethrowing exceptions. Write a program for the
01
02
same. [5]
5/2
GP
C++. [6]
16
8.2
.24
49
[6261]-42 2
8
Q7) a) What are the various algorithms available in STL? Explain any one with
23
C++ program. [5]
ic-
tat
b) Write a program to implement map in C++. [6]
1s
c) What is a container? What are various types of containers? Explain any
7:3
two containers in details. [7]
02 91
3:3
0
OR
41
1/0 13
Q8) a) What is the algorithm in STL? Explain sort function with example. [5]
0
5/2
.23 GP
8
C
23
c) What is iterator? Write a program in C++ to demonstrate the use iterator.
ic-
[7]
16
tat
8.2
1s
.24
7:3
91
49
3:3
30
41
… … …
01
02
5/2
GP
1/0
CE
82
8
23
.23
ic-
16
tat
8.2
1s
.24
7:3
91
49
3:3
30
41
01
02
5/2
GP
1/0
CE
82
.23
16
8.2
.24
49
[6261]-42 3