November / December 2021
Object Oriented Programming and Advanced Data Structures
Anna University
1 question papers available. Select an examination session to view its question paper.
Object Oriented Programming and Advanced Data Structures
Based on available extracted papers. Question groups and frequency are provisional, not official syllabus weightage or examination predictions.
What is the use of reference variables and static variables? Give examples 2
0 eligible source papersWhat is an abstract class? 2
0 eligible source papersvoid foo(int &x, int *y, int z , int *& a) 2 { x = 5; a = &x; *a = 8 ; *y = 6; z = 7; } int main() { int i =4; int * j = &i; foo(i , &i , i , j); cout << i << endl; return 0; }
0 eligible source papersWrite the code that creates an exception object to throw a divide by zero exception. 2
0 eligible source papersBriefly explain about BFS with an example. 2
0 eligible source papersWhat is the difference between Binomial Heaps and Fibonacci Heaps? 2
0 eligible source papersHow topological sort is differing from DFS? List out atleast four points 2
0 eligible source papersWhat is meant by graph traversal? Explain with suitable diagram 2
0 eligible source papersWhat is the difference between directed and undirected graph? 2
0 eligible source papersWhat is flow networks? List out two of it application 2
0 eligible source papers(a) (i) Explain the use of the following with example. 8 i) Copy constructor ii) Dynamic constructor iii) Dynamic initialization of objects (ii) Write the code to implement a MyString class that satisfies the following: 5 i) Addition of two strings (concatenation) - should be a friend function ii) Count the no of MyString objects created. (include static data member and static member function) iii) Provide methods with char* argument.
0 eligible source papers(b) (i) How to manage run time Polymorphism in a function by passing objects as 13 reference.
0 eligible source papers(a) (i) Write a generic program using template to print the array class as {1 2 3 4 5} 4 (ii) Write a program to search a key element in a given array of elements using 9 class template. Have generic search function that takes any data type and an overloaded search function that works for an integer element only.
0 eligible source papers(b) (i) Explain in detail about the four component of STL in detail with suitable 13 examples.
0 eligible source papers(a) (i) Construct a B - Tree for the elements 35, 20, 40, 50, 78, 10, 29, 55, 32, 60, 53, 6 90, 21, 25 using order 3. Delete 50, 29. (ii) Construct a Red Black tree for the elements 30, 25, 40, 50, 75, 10, 29, 65, 32, 7 60, 53, 90, 21, 25. Delete 50, 29.
0 eligible source papers(b) (i) Construct an AVL tree with values 3,2,1,4,8,6,7,16,11,14 into an initially empty 13 tree. Delete 4 from the tree. Clearly show the tree that results after each insertion, and make clear any rotations that must be performed. Write a routine to remove all leaf nodes from the tree. (Need to write the delete routine)
0 eligible source papers(a) (i) Construct the minimum spanning tree (MST) for the given graph using 13 Kruskal’s Algorithm
0 eligible source papers(b) (i) Trace the shortest path from A using Dijikstra's algorithm 13 Find a minimum spanning tree for the same graph using Prim's algorithm.
0 eligible source papers(a) (i) Construct the eulerian cycle for the values {1,0,3,4,0,2,1}. Explain step by step 13 execution for construction of cycle.
0 eligible source papers(b) (i) Assume A = {1, 2, 3, 4} and let R be the relation on A whose matrix is 13 described as follows: [ ] Use Warshall's algorithm to compute
0 eligible source papers(i) Use Floyd's algorithm to compute the distance matrix for the digraph whose 15 edge- weight matrix is: [ ]
0 eligible source papersHistorical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.