You are on page 1of 4

PDS II

UNIT-I
OBJECT ORIENTED PROGRAMMING FUNDAMENTALS

PART-B (16 MARKS)


1. Write short notes on comparison of conventional programming and OOPS.
2. Explain the control structures of C++ with suitable examples.
3. Write a menu driven program to accept 2 integers and an operator (+,-,*,%,/) and to perform
the operation and print the result.
4. Give the syntax and usage of an inline with examples.
5. Explain the importance of constructors and destructor with example.
6. Define friend class and specify its importance. Explain with suitable example.
7. Explain the merits and demerits of object oriented programming.
8. What are the difference between pointer to constants and constant to pointers?
9. Write a program to get the student details and print the same using pointers to objects and
pointers to members of a class. Create a class student. And use appropriate functions and data
members.
10.Write a program to demonstrate how a static data is accessed by a static member function.
11.Explain about call by value and return by reference with c++ programs.

UNIT-II
OBJECT ORIENTED PROGRAMMING CONCEPTS
PART-B (16 MARKS)

1. Write short notes on comparison of conventional programming and OOPS.


2. Explain the control structures of C++ with suitable examples.
3. Write a menu driven program to accept 2 integers and an operator (+,-,*,%,/) and to perform
the operation and print the result.
4. Give the syntax and usage of an inline with examples.
5. Explain the importance of constructors and destructor with example.
6. Define friend class and specify its importance. Explain with suitable example.
7. Explain the merits and demerits of object oriented programming.
8. What are the difference between pointer to constants and constant to pointers?
9. Write a program to get the student details and print the same using pointers to objects and
pointers to members of a class. Create a class student. And use appropriate functions and data
members.
10.Write a program to demonstrate how a static data is accessed by a static member function.
11.Explain about call by value and return by reference with c++ programs.

UNIT-II
OBJECT ORIENTED PROGRAMMING CONCEPTS
PART B (16 MARKS)

1. Define a class string. Use overload = = operator to compare two strings.


2. What is a parameterized constructor? Explain with example.
3. Describe the syntax of multiple inheritance. When do we use such an inheritance?
4. What is a virtual function? When do we make a virtual function pure?
5. What is operator overloading? Overload the numerical operators + and / for complex
numbers addition and division respectively.
6. Define friend class and specify its importance. Explain with suitable example.
7. Explain the concept of inheritance with an example.
8. Explain the operators used for dynamic memory allocation with examples.
9. Write a C++ program to define overloaded constructor and to perform string initialization and
string copy.
10.Illustrate the use of copy constructor and function overloading with C++ program.
11.What are the different forms of inheritance supported by C++? Explain with relevant example
code.
12.Explain protected data with private and public inheritance.
13.Explain about nested class with suitable example.

UNIT-III
C++ PROGRAMMING ADVANCED FEATURES
PART B (16 MARKS)

1. Explain with an example, how exception handling is carried out in C++.


2. Write a class template to insert an element into a linked list.
3. Write a class template to implement a stack.
4. What is a user defined exception? Explain with an example.
5. Write a C++ program to store set of objects in a file and to retrieve the same.
6. Highlight the features of STL.
7. List the different stream classes supported in C++
8. Write a C++ program to read the contents of a text file.
9. Explain the use of any six manipulators with example.
10.Discuss in detail the unformatted I/O operations.
11.Explain about allocators with suitable examples.
12.Write a program to implement a Random Access File?

UNIT-IV
ADVANCED NON-LINEAR DATA STRUCTURES
PART B (16 MARKS)

1. Discuss, compare and contrast Binomial heaps and Fibonacci heaps in terms of insertion,
deletion operations and applications.
2. Describe any one scheme for implementing Red-Black trees. Explain insertion and deletion
algorithm with details. How do these algorithms balance the height of the tree?
3. Write algorithm to construct Fibonacci heap with suitable example.
4. Write algorithm to construct Binomial heap with suitable example.
5. What are the properties of Red black trees?
6. What is the need for splay trees? Give an example.
7. Illustrate with an algorithm to show the insertion of data into an AVL tree.
8. Write an algorithm to merge two AVL trees T1 and T2 to obtain new AVL tree pointed out by
NT.
9. Write C++ member function to implement the following Fibonacci Heap operations
(i) Create an empty F-heap. (8)
(ii) Insert element x into F-heap. (8)
10.Explain Fibonacci Heap Deletion Key operation using Cascading-Cut procedure with
example.
11.Explain insertion procedure in Red-Black tree and insert the following sequence:
{ 20,10,5,30,40,57,3,2,4,35,25,18,22,21}
12.Show the result of inserting 10,17,2,4,9,6,8 into an empty AVL tree.
13.Write the procedure to implement single and double rotation while inserting nodes in AVL
tree.
14.Explain about disjoint sets.

UNIT-V
GRAPHS
PART B (16 MARKS)

1. Explain the method of constructing minimum cost spanning tree using Kruskals algorithm.
2. Explain briefly articulation points and biconnected components.
3. Explain the traversals of directed graphs also give its analysis.
4. Explain Prims algorithm to construct minimum spanning tree from an undirected graph.
5. What is topological sort? Write an algorithm to perform topological sort.
6. Write the pseudo code to find a minimum spanning tree using Kruskals algorithm.
7. Explain Dijkstras algorithm and solve the single source shortest path problem with an
example.
8.Illustrate with an example, the linked list representation of graph.

9.Explain about BFS with suitable example.


10.Explain about DFS with suitable example.
11.Explain about prims algorithm with suitable example.
12.Explain about bellmann-ford algorithm with suitable example.

You might also like