0% found this document useful (0 votes)
35 views12 pages

Ilovepdf Merged

Uploaded by

godseyash65
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)
35 views12 pages

Ilovepdf Merged

Uploaded by

godseyash65
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/ 12

Total No. of Questions : 8] SEAT No.

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

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
83

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

b) Write a program in C++ to use scope resolution operator. [6]


01
02
6/2
GP

c) What is friend function? What are the merits & demerits of using the
0/0

friend function? [6]


CE
83

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

operator so that it can add two complex numbers. [6]


.24

7:4
91
49

c) Write down program to overload unary operators? (Any three operators).


8:3
30

[6]
20
01
02
6/2
GP

Q3) a) Explain virtual base class & virtual function with example? [6]
0/0

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


CE
83

inheritance? Give example of each. [6]


.23

c) Discuss the ways in which inheritance promotes software reuse, saves


16

time during program development and helps prevent errors. [6]


8.2

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

c) Explain class template and function template with example. [5]


OR
E
83

8
Q6) a) Explain class template using multiple parameters? Write a program in
C

23
C++. [7]

ic-
16

b) Explain name space with example. [5]

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

b) Explain error handling during file operations. [5]


01
02

c) What is the difference between opening a file with construction function


6/2
GP

& open ( ) function. [6]


0/0

OR
CE
83

8
23
Q8) a) Write a program using the open ( ), eof ( ) & getline ( ) functions to open
.23

& read file contents line by line.


ic-
[6]
16

tat
b) Explain file functions for text file and binary file operations. [7]
8.2

0s
.24

c) Explain file opening modes in detail. [4]


7:4
91
49

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

Time : 2½ Hours] [Max. Marks : 70


E
80

8
Instructions to the candidates:
C

23
1) Attempt Q1 or Q2, Q3 or Q4, Q5 or Q6, Q7or Q8.

ic-
16

2) Figures to the right indicate full marks.

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

to achieve polymorphism in C++ Language? Explain them along with


02

examples.
2/2

[5]
GP

b) What is operator overloading? Write a program to overload '+' operator


7/0

for adding two complex numbers which are object of below complex
CE
80

8
23
class. [6]
.23

Class Complex ic-


16

tat
{
8.2

6s

Private: int real, imag;


.24

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

Q2) a) What is runtime polymorphism? How it is achieved in C++. Explain it


CE

along with example.


80

[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

c) Explain abstract class concept along with example. [6]


.24
49

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

c) Write a program to create files using constructor function. [4]


7/0
CE
80

8
23
.23

Q5) a) Distinguish between overloaded function and function template with


ic-
16

suitable example. [4]


tat
8.2

6s

b) What is an exception specification? Explain using suitable example.


.24

9:0
91

[6]
49

3:1
30

c) What is generic programming? How it is implemented in C++.


31

[7]
01
02

OR
2/2
GP

Q6) a) Write short note on type name and export key-word.


7/0

[4]
CE
80

b) Explain class template using multiple parameters with help of program.


.23

[6]
16

c) Explain exception handling mechanism in C++? Explain by program


8.2

to handle "divide by zero". [7]


.24
49

[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

1) Endsem exam based on 3, 4, 5, 6.


2) Draw Neat and clean Diagram.
E
81

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

demonstrate use of unary operator overloading. [6]


31

OR
01
02

Q2) a) Explain polymorphism and types of polymorphism in C++. [5]


6/2
GP

b) Explain what is type casting, Explain Implicit and explicit type of


6/0

conversion with example. [6]


CE
81

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

Explain using example. [7]


4:4
91

b) Explain command line arguments in C++? Write program to explain the


49

0:4

same. [7]
30
31

c) What are different file opening mode? [4]


01
02

OR
6/2
GP

Q4) a) Explain formatted and unformatted input and output functions used in
6/0

C++ with example. [7]


CE
81

b) What are stream classes and their use? Provide the hierarchy of stream
classes in C++. [7]
.23

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


16

command line arguments what will be prototype of main function and


8.2

explain its arguments along with example. [4]


.24

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

c) How multiple catching is implemented in exception handling? [6]


E
81

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

Explain with a appropriate example. [7]


6/0

b) Explain the concept of iterators in the STL. Differentiate between iterator


CE
81

and pointers. [7]

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

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

2) Draw Neat and Clean Diagram.


3) Assume Suitable data, if necessary.
E
82

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

c) Define a class string and use binary overloaded operator (= =) to compare


41

two strings. [6]


01
02
5/2

OR
GP
1/0

Q2) a) What is abstract base class in C++ polymorphism? Explain with program.
CE
82

[5]

8
23
.23

b) Explain Virtual destructor with the help of a program. [6]


ic-
16

tat
8.2

1s

c) Write C++ program to demonstrate use of unary operator (- -)


.24

7:3
91

overloading using member function and unary operator overloading (++)


49

3:3

using friend function. [6]


30
41
01
02
5/2

Q3) a) Explain the errror handling in file I/O. [5]


GP
1/0

b) Explain the two ways in which files can be opened, open () and Using
CE
82

constructor with a program. [6]


.23

c) What is stream? Explain types of stream available in C++ i.e istream,


16

ostream, ifstream and ofstream. [7]


8.2

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

Q5) a) What is exception in C++? Explain each keyword to handle exception in


5/2
GP

C++. [5]
1/0
CE
82

8
b) What is template function? Explain with suitable example. [6]

23
.23

c) Explain class template. Write a program to demonstrate class templeateic-


16

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

b) What is generic programming? How it is implemented in C++. [6]


1/0
CE
82

c) Write a program in C++ to demonstrate class type exception handling in


.23

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

b) What is a sequential container? List various sequential containers.


Compare arrays and vectors. [6]
E
82

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

You might also like