SUBJECT QUESTION PAPER COLLECTION

EC23C06 – DATA STRUCTURES AND PROGRAMMING IN C++

Anna University

B.E. Electronics and Communication Engineering Electronics and Communication Engineering Regulation 2023 Semester 2
1 Question Papers
2025 Earliest Year
2025 Latest Year

📚 Previous Year Question Papers

1 question papers available. Select an examination session to view its question paper.

PDF

April / May 2025

DATA STRUCTURES AND PROGRAMMING IN C++

Historical Examination Intelligence

Based on available extracted papers. Question groups and frequency are provisional, not official syllabus weightage or examination predictions.

1Source papers
1Papers with questions
24Question occurrences
24Distinct question candidates
0Exact repeat candidates
100.0%Extraction coverage

Papers by examination year

20251

Question type candidates

Other Or Unclassified18
Definition2
Short Description1
Design1
Explanation1
Comparison1

Detected examination patterns

A+B+C1

Search historical questions

List the member dereferencing operators with their functionality. 2 01 1

0 eligible source papers

Identify the error in the following program 2 01 2 #include <iostream.h> Class staticFunction

0 eligible source papers

static int count; public: static void setCount() { count++; } void diplayCount() € cout << count; } } int staticFunction::count = 10; void main() { staticFunction obj1; obj1.setCount(5); staticFunction::setCount(); obj1.displayCount(); }

0 eligible source papers

How do the properties of the following two derived classes differ? 2 CO2 3 (i) class D1:private B{//...}:; (ii) class D2:public B{/....};

0 eligible source papers

What is composition? How does it differ from inheritance? CO2 2 பியட்‌

0 eligible source papers

A two-dimensional array A[5][10] is implemented in row order CO3 3 manner in the memory. Deduce the address of the A[3][5] element, if the base address of the array is 3000 and the word size is 2. Assume the lower bound of row and column indices to be 1. Define priority queue. How is it different from a normal queue? CO3 + — NO Find the degree of all the nodes for the following graph பியட்‌ 04 List out the applications of Tree data structures? CO4 வட்‌ |} Solve the insertion sort for the following elements 44,33,11,55,77,90,40,60 CO5 10 Give the best and worst case time complexity for merge sort and quick sort CO5

0 eligible source papers

(a) Define a class String that could work as a user-defined string type. Include constructors that will enable us to create an uninitialized string String s1; // string with length 0 and also to initialize an object with a string constant at the time of creation like String s2 (“well done!”); Include a function that adds two strings to make a third string. Note that the statement 52 = 51; Will be perfectly reasonable expression to copy one string to another. Write a complete program to test your class to see that it does the following tasks: (i) Creates uninitialized string objects. (ii) Creates objects with string constants. (iii) Concatenates two strings properly. (iv) Display a desired string object. 13 co1 1

0 eligible source papers

(b) Design a class Polar which describes a point in the plane using polar coordinates radius and angle. A point in polar coordinates is shown in fig.1 point(ra) a | ? ly 1 கம்ப அப்படி [12.1 Polar coordinates of a point Use the overloaded + operator to add two objects (radius and angle) of Polar. Note that we cannot add polar values of two points directly. This requires first the conversion of points into rectangular coordinates, then adding the corresponding rectangular coordinates and finally converting the result back into polar coordinates. You need to use the following trigonometric 13 co1 formulae : x =r* cos(a); y =r* sin(a); a = atan(y/x); // arc tangent r= sqrt(x’x + y"y);

0 eligible source papers

(a)(i) An educational institution wishes to maintain a database of its employees. The database is divided into a number of classes whose hierarchical relationships are shown in fig.2. The figure also shows the minimum information required for each class. Specify all the classes and define functions to create the database and retrieve individual information using C++ program. Staff Code Name Teacher Subject Publication officer grade typist speed casual daily wages regular Fig.2. Class relationships 10 02 |

0 eligible source papers

(a)(ii) Compare and contrast between abstract base classes and concrete classes. |.

1 eligible source papers

(b)(i) Create a base class called shape. Use this class to store two double type values that could be used to compute the area of figures. Derive two specific classes called triangle and rectangle from the base shape. Add to the base class, a member function get_data() to initialize base class data members and another member function display_area() to compute and display the area of figures. Make display_area() as a virtual function and redefine this function in the derived classes to suit their requirements. Using these three classes, design a program that will accept dimensions of a triangle or a rectangle interactively, and display the area. Remember the two values given as input will be treated as lengths of two sides in the case of rectangles, and as base and height in the case of triangles, and used as follows: Area of rectangle = x * y Area of triangle = %* x*y 10 CO2 |

0 eligible source papers

(b)(ii) Explain with an C++ program the use of ‘this’ pointer CO2 |.

0 eligible source papers

(a)(i) The contents of a queue Q are as follows: Queue (Q) | 4 5 -9 66 Index 0 1 2 3 4 5 6 7 F? R? The queue can store a maximum of eight elements and the front (F) and rear (R) pointers currently point at index O and 3 respectively. Show the queue contents and indicate the position of the front CO3 INO and rear pointers after each of the following queue operations: (i) Insert (Q,16) (ii) Delete (Q) (iii) Delete (Q) (iv) Insert (Q,7) (v) Delete (Q) (vi) Insert (Q,-2) Write a C++ program for the given queue operations with the pictorial representation.

0 eligible source papers

(a)(ii) Write the algorithm for inserting an element in the beginning and end in a singly linked list CO3 INO

0 eligible source papers

(b)(i) Convert the following Arithmetic Infix expression (A+(B/C-(D*E*F)+G)*H) to Polish notation and Reverse Polish notation using stack implementation of Arrays. CO3 INO

0 eligible source papers

(b)(ii) Explain in detail with the algorithm how the given two polynomial equation can be added using linked list P(x) = 15x"? + 3x°+ 10 Q(x) = 10x® + 16x° + 5x? CO3 INQ

0 eligible source papers

(a)(i) Construct the given set in the levei order {A, B, C, D, E, F, G, H, I, J, K, L} and traverse the binary tree in preorder, postorder and inorder traversals. Write down the expressions. CO4 ln

0 eligible source papers

(a)(ii) Give an example to demonstrate the union find operation and name any one of its application CO4 INO

0 eligible source papers

(b)(i) Find the Minimal Spanning Tree for a Graph using Prim’s algorithm CO4 lon

0 eligible source papers

(b)(ii) Represent the following graph using adjacency matrix and adjacency list CO4 INO

0 eligible source papers

(a) Explain the heap sort method with the step by step procedure for sorting. the following unordered list of elements (37,26,42,2,8,81,9).Write an algorithm with C++ programming for the given elements. 13 CO5 lw

0 eligible source papers

(b) Differentiate between linear search and binary search. Write an algorithm and implement a C++ program for performing binary search and linear search for the array {22,13,7,80,89,1,5,110,19} given and write the steps for searching 89 in the above array. 13 CO5 [62 Page 4076

0 eligible source papers

(i) Create two classes DM and DB which store the value of distances. DM stores distances in metres and centimetres and DB in feet and inches. Write an C++ program that can read values for the class objects and add one object of DM with another object of DB. Use a friend function to carry out the addition operation. The object that stores the results may be a DM object or DB object, depending on the units in which the results are required. The display should be in the format of feet and inches or metres and centimetres depending on the object on display. 10 co1 [ம்‌

0 eligible source papers

(ii) With a neat step-by-step schematic, solve for Depth dai Search algorithm from the following graph 04 lo ee வைகைகைவ் ப வை னக மள்காரரம்‌

0 eligible source papers

Advanced Examination Analysis

Historical analysis based on extracted question papers. Topic classifications, marks and planning estimates are provisional.