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

Oop Merged

The document contains a set of examination questions for an Object Oriented Programming course, covering topics such as operator overloading, inheritance, templates, and file handling in C++. Each question provides options for candidates to choose from and includes programming tasks to demonstrate understanding of the concepts. The exam is structured to assess knowledge through theoretical questions and practical programming exercises.
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)
50 views12 pages

Oop Merged

The document contains a set of examination questions for an Object Oriented Programming course, covering topics such as operator overloading, inheritance, templates, and file handling in C++. Each question provides options for candidates to choose from and includes programming tasks to demonstrate understanding of the concepts. The exam is structured to assess knowledge through theoretical questions and practical programming exercises.
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-1197 [Total No. of Pages : 2

ic-
[5925]-219

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

3s
OBJECT ORIENTED PROGRAMMING (2019

8:1
02 91
3:3
Pattern) (Semester - IV) (204194)

0
31
0/0 13
Time : 2½ Hours] [Max. Marks : 70
0
1/2
Instructions to the candidates:
.23 GP

1) Attempt Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.


E

2) Neat diagrams must be drawn whenever necessary.


81

8
C

23
3) Figures to the right side indicate full marks.

ic-
4) Use of calculator is allowed.
16

tat
5) Assume suitable data if necessary.
8.2

3s
.24

8:1
91
49

3:3
Q1) a) What are the rules for overloading operators? [4]
30
31

b) Write down a C++ program to implement operator overloading for


01
02

complex class. [8]


1/2
GP

c) Explain Friend function with example. [6]


0/0
CE
81

8
OR

23
.23

Q2) a) What is operator overloading? Write a program to overload Unary


ic-
16

tat
operator. [8]
8.2

3s
.24

b) Write down a C++ program for copy constructor for string class. [6]
8:1
91
49

3:3

c) Differentiate friend function with normal function of the class. [4]


30
31
01
02
1/2

Q3) a) Explain containment and Inheritance along with examples. [6]


GP
0/0

b) What is Virtual function? Explain how to achieved run time


CE
81

polymorphism. [6]
.23

c) Explain function over loading & function overriding in detail. [6]


16
8.2

OR
.24
49

P.T.O.
Q4) a) What does inheritance mean in C++? Give an example of each. [6]

8
23
b) What is polymorphism? Explain with example to achieved run time

ic-
polymorphism. [6]

tat
3s
c) Write copy constructor for Employee class, in which objects of string

8:1
class and Date class are the Data members. [6]

02 91
3:3
0
31
Q5) a) 0/0 13
What is a user defined exception? Write down the scenario where we
0
require use define exceptions.
1/2 [6]
.23 GP

b) What is namespace? To demonstrate namespace with example. [6]


E
81

8
c) Explain class template & function template with example. [5]
C

23
ic-
OR
16

tat
8.2

3s
Q6) a) What is stream? Explain types of streams available in C++. [6]
.24

8:1
91
b) Explain namespace in C++ with example? [6]
49

3:3
30

c) Compare late binding & early binding. [5]


31
01
02
1/2
GP

Q7) a) Explain error handling during file operations. [6]


0/0
CE
81

8
b) Write a program using put ( ) to write characters to a file until user

23
.23

enteres a dollar sign. [6]


ic-
16

tat
c) Write a note on file operating modes. [5]
8.2

3s
.24

OR
8:1
91
49

3:3

Q8) a) Explain manipulators for file handling in C++? [5]


30
31

b) What is file pointer? Write a note on file opening & file closing. [6]
01
02
1/2

c) Explain stream classes hierarchy for file handling in C++. [6]


GP
0/0
CE
81
.23


16
8.2
.24

[5925]-219
49

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

8
2) Neat diagrams must be drawn wherever necessary.
C

23
3) Figures to the right side indicate full marks.

ic-
16

tat
4) Use of calculator is allowed.
8.2

9s
5) Assume Suitable data if necessary.
.24

6:3
91
49

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

the friend function? [6]


31
01

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


02
7/2

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


GP

operators. [6]
9/0
CE

OR
80

8
23
.23

Q2) a) What is operator overloading? Why it is necessary to overload an


operator? [6] ic-
16

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


91

[6]
49

0:3
30
31
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]
7/2
.23 GP

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


C++. [6]
E
80

8
C

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

ic-
OR
16

tat
8.2

9s
Q6) a) Explain Namespace in C++ with example. [6]
.24

6:3
b) Write a C++ program using function template to find the product of
91
49

0:3
two integer or floating-point type of data. [6]
30
31

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


01
02

require user defined exceptions. [6]


7/2
GP
9/0

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

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

23
.23

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

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

9s

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

6:3

[6]
91
49

0:3

OR
30
31

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
Total No. of Questions : 8] SEAT No. :

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

ic-
tat
[6179]-224

7s
S.E. (Electronics / Electronics & Computer/E&TC)

8:0
02 91
OBJECT ORIENTED PROGRAMMING

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

30
3/1 13
Time : 2½ Hours] [Max. Marks : 70
0
2/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

2) Neat diagrams must be drawn wherever necessary.


82

8
C

23
3) Figures to the right indicate full marks.

ic-
4) Use of calculator is allowed.
16

5) Assume suitable data if necessary.

tat
8.2

7s
.24

Q1) a) What is a friend function? What are the merits and demerits of using the
8:0
91
friend function? [6]
49

9:3
30

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


30
01

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


02

operators. [6]
2/2
GP
3/1

OR
CE
82

Q2) a) What is operator overloading? Why it is necessary to overload an

8
23
Operator? [6]
.23

ic-
16

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


tat
8.2

7s

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


.24

8:0
91
49

9:3

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


30
30

in Multiple base classes. [6]


01
02

b) What is containment? Explain with the help of String. Date and Employee
2/2
GP

class. Objects of Date and String classes are data members of Employee
3/1

Class. [6]
CE
82

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


inheritance? Give an example of each. [5]
.23
16

OR
8.2

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

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

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

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

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

8:0
02 91
overcome. Explain with example. [5]

9:3
0
30
Q5) a) 3/1 13
Explain exception handling mechanism in C++? Write a program in C++
0
to handle divide by zero exception?
2/2 [6]
.23 GP

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


C++. [6]
E
82

8
C

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

ic-
OR
16

tat
8.2

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

7s
.24

8:0
b) Write a C++ program using function template to find the product of two
91
49

integer or floating-point type of data. [6]


9:3
30

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


30

require user defined exceptions. [6]


01
02
2/2
GP
3/1

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

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


82

8
23
.23

b) Explain the role of seekg(), seekp(), tellg(),tellp(), function in the process


of random access in a file. ic-
[5]
16

tat
8.2

7s

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

8:0

OR
91
49

9:3

Q8) a) Write a program using put() to write characters to a file until user enters
30
30

a dollar sign. [6]


01
02

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


2/2

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


GP
3/1

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


CE
82
.23


16
8.2
.24

[6179]-224 2
49
Total No. of Questions : 8] SEAT No. :

8
23
PB3619 [6261]-24 [Total No. of Pages :2

ic-
tat
S.E. (Electronics/E & TC) (Electronics & Computer Engineering)

0s
OBJECT ORIENTED PROGRAMMING

2:2
02 91
(2019 Pattern) (Semester- IV) (204194)

3:4
0
Time : 2½ Hours ] [Max. Marks : 70

41
5/0 13
Instructions to the candidates:
0
1) Attempt Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
5/2
.23 GP

2) Neat diagrams must be drawn wherever necessary.


3) Figures to the right indicate full marks.
E
82

8
C

23
4) Use of Calculator is allowed.

ic-
5) Assume suitable data if necessary.
16

tat
8.2

0s
Q1) a) What is operator overloading? Why it is necessary to overload an
.24

2:2
91
operator? [6]
49

3:4
b) Write a program to demonstrate friend function in C++. [6]
30
41

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


01
02

OR
5/2
GP

Q2) a) Explain friend function with example? [6]


5/0
CE

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


82

8
23
c) Give a programming example that overloads = = operator with its use.[6]
.23

ic-
16

tat
8.2

Q3) a) Explain virtual base class and virtual function with example. [6]
0s
.24

2:2

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


91

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


49

3:4
30

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


41

inheritance? Give an example of each. [5]


01
02

OR
5/2
GP

Q4) a) Write a C++ program demonstrating use of the pure virtual function with
5/0

the use of base and derived classes. [6]


CE
82

b) Discuss the role of access specifiers in inheritance and show their visibility
.23

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


16

c) What is the ambiguity that arisesin multiple inheritance? How it can be


8.2

overcome? Explain with example. [5]


.24
49

P.T.O.
Q5) a) Explain exception handling mechanism in C++? Write a program in C++

8
23
to handle divide by zero exception? [6]

ic-
b) Explain class template using multiple parameters? Write a program in

tat
C++. [6]

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

02 91
3:4
OR

0
41
Q6) a) 5/0 13
Explain Namespace in C++ with example. [6]
0
5/2
b) Write a C++ program using function template to find the product of two
.23 GP

integer or floating-point type of data. [6]


E
82

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

8
C

23
require user defined exceptions. [6]

ic-
16

tat
8.2

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

2:2
to open and read a file content line by line. [6]
91
49

3:4
b) Explain the role of seekg(), seekp(), tellg(), tllp(), function in the process
30
41

of random access in a file. [5]


01
02

c) What is file mode? Explain any four file modes supported by C++. [6]
5/2
GP

OR
5/0
CE
82

8
Q8) a) Write a program using put( ) to write characters to a file until user enters

23
a dollar sign. [6]
.23

ic-
16

tat
b) Waht is the difference between opening a file with constructor function
8.2

0s

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


.24

2:2

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


91
49

3:4
30
41
01
02


5/2
GP
5/0
CE
82
.23
16
8.2
.24
49

[6261]-24 2
Total No. of Questions : 8] SEAT No. :

7
23
PC2800 [Total No. of Pages : 2

ic-
[6352]-24

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

3s
OBJECT ORIENTED PROGRAMMING

4:2
02 91
(2019 Pattern) (Semester - IV) (204194)

9:3
0
40
Time : 2½ Hours] 8/1 13 [Max. Marks : 70
Instructions to the candidates:
0
2/2
.23 GP

1) Solve Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.


2) Neat diagrams must be drawn wherever necessary.
E

3) Figures to the right indicate full marks.


71

7
C

23
4) Use of calculator is allowed.

ic-
5) Assume suitable data, if necessary.
16

tat
8.2

3s
Q1) a) Explain Friend function with example. [6]
.24

4:2
91
b) Which operators cannot be overloaded? Write steps to add two complex
49

9:3
numbers using + operator overloading. [6]
30
40

c) Write down program to overload unary operators. [6]


01
02

OR
2/2
GP

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


8/1
CE

b) Explain the operator overloading. Also, explain different steps for


71

7
23
overloading operator. [6]
.23

c) Explain the concept of Bianary operator overloading with example. ic-


[6]
16

tat
8.2

3s
.24

4:2

Q3) a) What does inheritance mean in C++? Explain different forms of


91
49

Inheritance. [6]
9:3
30

b) Explain the pure virtual function. State the rules for virtual function. [6]
40
01

c) Discuss the role of access specifiers in inheritance and show their visibility
02
2/2

when they are inherited as public, private and protected. [5]


GP
8/1

OR
CE
71

Q4) a) Explain virtual base class and virtual function with example. [6]
.23

b) What is the ambiguity that arises in multiple inheritance? How it can be


overcome? Explain with example. [6]
16
8.2

c) Explain Containment and Inheritance along with examples. [5]


.24

P.T.O.
49
Q5) a) What is stream? Explain types of streams available in C++. [6]

7
23
b) Write a program to swap two integer, two character and two float values

ic-
using function template. [6]

tat
3s
c) Explain exception handling mechanism in C++. Write a program in C++

4:2
to handle divide by zero exception. [6]

02 91
9:3
OR

0
40
Q6) a)
8/1 13
Write a program to illustrate class template using multiple parameters.[6]
0
2/2
b) Explain the following terms. [6]
.23 GP

i) Throwing mechanism
E
71

7
C

23
ii) Catching mechanism

ic-
iii) Multiple catch statements
16

tat
8.2

3s
c) Explain name space with example. [6]
.24

4:2
91
49

9:3
30

Q7) a) Explain the classes for file stream operations. [6]


40
01

b) Write a program using put () to write characters to a file until user enters
02
2/2

a dollar sign. [6]


GP
8/1

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


CE
71

7
23
OR
.23

Q8) a) ic-
Explain opening a file with constructor function and opening a file with
16

tat
8.2

open () function. [6]


3s
.24

4:2

b) Explain following functions for manipulation of file pointers. [6]


91
49

9:3

i) seekg()
30
40

ii) seekp()
01
02
2/2

iii) tellg()
GP
8/1

c) Write a program using the open ( ), eof ( ) andgetline ( ) functions to


CE
71

open and read file contents line by line. [5]


.23
16


8.2
.24

[6352]-24 2
49

You might also like