Object Oriented Programming & Data Structure PDF
Object Oriented Programming & Data Structure PDF
rg
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
.O
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.
8. Due credit will be given to neatness and adequate dimensions.
ts
9. Assume suitable data whenever necessary.
10. Illustrate your answers whenever necessary with the help of neat sketches.
11. Answer any six questions.
1. a)
n
Explain the various features of C++ programming language. How C++ is better than C 6
de
language?
i) Object
ii) Class
S
iii) Encapsulation
OR
2. a) Write a C++ program to find area of circle and rectangle by using default and 7
parameterized constructor.
gp
4. a) What do you understand by class template? When and where the class templates can be 7
used?
TKN/KS/16/7303/7308 1 P.T.O
5. a) What do you mean by abstract class? Are abstract class, virtual function and pure virtual 9
functions related? Explain.
OR
rg
b) Explain multilevel inheritance in detail with an example. 8
7. a) Find the expected number of passes, comparison and exchange for bubble sort when the 5
given sequence is as follows.
.O
7, 1, 3, 4, 10, 9, 8, 6, 5, 2
b) Is bubble sort an efficient sorting technique than merge sort? Justify your answer. Explain 8
ts
merge sort in detail.
OR
8. a)
integers.
n
Write a C++ program using linear search technique to search a number in an array of 256 6
de
b) Is linear search efficient than binary search? Explain binary search technique giving an 7
example.
9. a) Define queue. How does it differ from the stack? Describe an insert and delete operations 7
tu
b) Write a C++ program to implement PUSH and POP operation on stack. Also write a 7
display function that will display the content of stack.
S
OR
ur
10. a) Write a program to create a singly linked list also write functions for the following 7
operations.
i) Forest
TKN/KS/16/7303/7308 2
b) Explain the concept of threaded binary tree. Write a function to obtain in order traversal of 8
threaded binary tree.
OR
Preorder : 1, 2, 4, 7, 5, 8, 3, 6, 9
rg
Draw a tree and write its postorder traversal expression.
.O
A
ts
B C
D E F
n G
de
H
********
S tu
ur
gp
Na
TKN/KS/16/7303/7308 3 P.T.O
rg
.O
n ts
de
Stu
ur
gp
Na
TKN/KS/16/7303/7308 4