OBJECT ORIENTED DATA STRUCTURE

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Course Code : CST 211 CXDW/RW – 18 / 5026

Third Semester B. E. (Electronics and Communication Engineering)


Examination

OBJECT ORIENTED DATA STRUCTURE

Time : 3 Hours ] [ Max. Marks : 60

Instructions to Candidates :—
(1) All questions carry equal marks. Read internal choice carefully.
(2) All six questions are compulsory.
(3) Assume suitable data wherever necessary.
(4) Illustrate answers with code and examples wherever necessary.

1. (a) Explain use of following C++ operators with proper syntax and example
for each :
(i) :: (ii) new
(iii) << 5(CO 1)

(b) What is difference between Object Oriented Programming and Procedure Oriented
Programming ? Explain basic concepts of Object Oriented programming.
5(CO 1)

2. Solve any Two questions :


(a) What are special characteristics of static member variable ? Illustrate static
member variable and static member function. 5(CO 1)
(b) Write C++ program to swap the value of integer data member of two
different classes using the concept of friend function. 5(CO 1)
(c) What are constructor and destructor ? Write C++ program to demonstrate
different types of constructor. 5(CO 1)

3. Solve any Two questions :


(a) Create a class time to represent time in hours and minutes. Write C++
program to create objects of class time and overload + operator to add
two objects of class time. 5(CO 1)
CXDW/RW-18 / 5026 Contd.
(b) What is inheritance ? Explain multiple inheritance with proper example.
5(CO 1)
(c) What is difference between virtual and pure virtual function ? Write C++
code to demonstrate virtual function. 5(CO 1)

4. (a) Write program to find sum of all diagonal elements of matrix of size 5x5.
5(CO 2,CO 3)
(b) Explain time and space complexity of an algorithm by giving suitable example.
5(CO 2,CO 3)

5. (a) Write an algorithm to delete an item from circular Queue.


5(CO 2,CO 3)
(b) Convert following infix expression into postfix expression using stack:
A + (B * C – (D/E ^ F) * G) * H 5(CO 2,CO 3)
OR

(c) What is stack ? Write steps to convert infix expression to postfix using
stack. 5(CO 2,CO 3)

6. (a) Write an algorithm :


(i) To insert a node at the beginning of singly link list.
(ii) To insert a node at the end of singly link list.
5(CO 2,CO 3)

OR

(b) Write an algorithm to delete a node from specific position in singly link
list. 5(CO 2,CO 3)
(c) What is double linked list ? Write steps for inserting node at the beginning
of double linked list. 5(CO 2,CO 3)

CXDW/RW-18 / 5026 2 205

You might also like