0% found this document useful (0 votes)
95 views

CS 6301 - Programming and Data Structure

This document appears to be a question paper for a Computer Science and Engineering examination covering topics related to programming and data structures in C++. It contains 3 parts with multiple choice and long answer questions. Part A has 10 short answer questions worth 2 marks each. Part B has 5 long answer questions worth 13 marks each. Part C has 1 long answer question worth 15 marks involving analyzing time complexity, identifying suitable tree data structures, or implementing inheritance and polymorphism concepts using C++ code.

Uploaded by

billasankar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

CS 6301 - Programming and Data Structure

This document appears to be a question paper for a Computer Science and Engineering examination covering topics related to programming and data structures in C++. It contains 3 parts with multiple choice and long answer questions. Part A has 10 short answer questions worth 2 marks each. Part B has 5 long answer questions worth 13 marks each. Part C has 1 long answer question worth 15 marks involving analyzing time complexity, identifying suitable tree data structures, or implementing inheritance and polymorphism concepts using C++ code.

Uploaded by

billasankar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

I Question Paper Code: 71()73I

RE./B.Tech. DEGREE EXAMINATION, APRILIMAY 2017.

Third Semester

Computer Science and Engineering

CS 6301 - PROGRAMMING AND DATA STRUCTURE

(Common to Information Technology)

(Regulations 2013)

Time: Three hours Maximum: 100 marks

Answer ALL questions.

PART A - (10 x 2::;:20 marks)


1. List the features of Object Oriented C++ programming.
2. What is the role of 'this' pointer.
3. Define multiple inheritance, Give example.
4. List different operators of C++ that can be overloaded. Give one example.
5. Define abstract class. Give example.
6. State the uses of templates in C++ programming:
7. Define Balance Factor of AVL Tree.
8. List the properties of Red Black Tree.
9. State the principle of Topological Sorting.
10. Write procedure for Depth First search algorithm.

PART B - (5 x 13 = 65 marks)

11. (a) Define class and object. Explain different types of constructors using C++
Program.

Or
(b) Explain the different types of storage classes of C++ usmg suitable
examples.
12. (a) Demonstrate the following string operations using C++ p:rogram -
(i) finding the length of string (ii) finding the substring from the string
(iii) replace a given substring in a string (iv) concatenate two strings .
(v) compare two strings (vi) insert a substring in a given string.

Or
(b) Assume the classes Person Student and PartTimeStudent are inherited
from one another. Define classes with suitable data members (common
and special attributes) and methods using C++ program to demonstrate
the types of inheritance.

13. (a) (i) Define STL. Explain its key components and types. (5)
(ii) Write C++ code using function template to sort the items of an
array. (8)

Or
(b) (i) Write C++ file handling routine to copy one content of file into
another file. (7)

(ii) Explain the use of exception handling in C++ with suitable


example. (6)

14. (a) (i) Merge the given Binomial heaps. Write procedure for merge
operation. (5+3)

H1: 0 0{ H2:
G
0
(ii) Delete three elements from the merged Binomial Queue. (5)

Or
(b) (i) Draw B-tree of order m = 5 for the keys
{K,0, S, V, M, F, B, G, T, U, W}. (6)
(ii) Delete the keys K and G in order. (4)
(iii) Justify the number of splits needed for insert/delete with proper
re~M. ~

2 71673
15. (a) Consider the following graph. Determine the shortest distance to all
other nodes using Dijikstra's algorithm. Write Procedure. (10+3)

Or
(b) Determine the minimum spanning tree of a given Graph using Kruskal's
algorithm. Write Kruskal's MST algorithm. (10+3)

PART C - (1 x 15 = 15 marks)'

16. (a) Assume the following keys form the Binary Search tree {50, 30, 60, 40,
35, 80, 90}. Analyze the time complexity involved in searching the keys
90 and then 80, when the given BST is converted into AVL or Splay tree.
Identify the suitable tree data structure for representing this data and
justify your answer with valid reasons.
Or
(b) The Manager, class is derived from Employee class. Use C++ virtual
function to calculate salary of EmployeelManager class. Increments for
employees differ based on their category. Assume suitable common and
special attributes for the classes. Implement this scenario using C++ code
to calculate the monthly and annual payment of each employee category.

3 71673

You might also like