// Anna University, Chennai / 2023
Anna University — C Programming and Data Structures (CS3353), November/December 2023
C Programming and Data Structures · CS3353 · R2021 · B.E. Electrical and Electronics Engineering · Semester 3
Files open in a new tab. Use your browser's download or save option to keep a copy.
Work through the questions
16 questions
No verified answers are available for this paper.
C Programming and Data Structures
What are the types of conditional statements in C.
No verified answer or solution is available for this question.
C Programming and Data Structures
What is the output of the program? #include <stdio.h> #define m 5 + 5 const int n = 5 + 5; void main() { int a = 0, b = 0; a = m * m; b = n * n; printf("%d %d\n", a,b); }
No verified answer or solution is available for this question.
C Programming and Data Structures
What is the preprocessor directives in C?
No verified answer or solution is available for this question.
C Programming and Data Structures
What will be the value of j for below-mentioned values of i? switch (i) { case 2: i = i * i; case 4: i = i * i; default: i = i * i; break; case 16: i = i * i; } j = i; for I = 2, j = ? for I = 16, j = ?
No verified answer or solution is available for this question.
C Programming and Data Structures
What is ADT? Give example.
No verified answer or solution is available for this question.
C Programming and Data Structures
Data are enqueued to (ENQ operation) and dequeued from (DEQ operation) a queue in the following order: ENQ 4; ENQ 9; FRONT; ENQ 7; ENQ 19; FRONT; DEQ; DEQ; FRONT; Write the values returned by FRONT for the sequence of operations above.
No verified answer or solution is available for this question.
C Programming and Data Structures
- 2023
- 2022
Also asked in Anna University — C Programming and Data Structures (CS3353), November/December 2022 (2022).
Define separate chaining?
No verified answer or solution is available for this question.
C Programming and Data Structures
What is the preorder and post order traversal of the figure 1?

Figure 1 — binary tree for Q8 No verified answer or solution is available for this question.
C Programming and Data Structures
When is linear search is highly inefficient compared to binary search?
No verified answer or solution is available for this question.
C Programming and Data Structures
Give an example on max heap and min heap.
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) (i) State and explain the single and multi-dimensional array with examples. (5) (ii) Write C program for a double dimensional array: (3+3+2) (1) Find largest and smallest value. (2) Find sum of non-diagonal elements. (3) Find the transpose of a matrix. (OR) (b) (i) Distinguish between interative and recursive function with suitable example. (5) (ii) Write both iterative and recursive functions in C to evaluable aᵇ. (4+4)
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) (i) Distinguish between structures and unions with example. (5) (ii) State the need of pointers in C program? Explain the usage of integer pointer and structure pointer with example. (8) (OR) (b) (i) State and explain the preprocessor directives. (5) (ii) What are different types of files available. Write a C program to copy the content of one file to another. (8)
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) (i) What is doubly linked list. Write the function to insert and remove elements from a doubly linked list. (5) (ii) How to implement the stack ADT using two queues? Write the function for the push and pop operations (Note: Simulate stack operations using two queues). (8) (OR) (b) (i) Write the function for adding and removal of an element from a queue using array implementation. (5) (ii) Convert the following Infix expression into postfix expression x * (w + y/2 * x^(4 + x) and evaluate the obtained postfix expression using the values (x = 1, y = 2, w = 3). (8) [Transcription note: The expression is printed without the outer closing parenthesis.]
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) (i) Distinguish between binary tree and expression tree with examples. (5) (ii) What is open addressing? Explain the collision resolution strategies in open addressing with examples. (8) (OR) (b) State and explain the insertion and deletion operation in a binary search free with example. [Transcription note: The paper prints “binary search free”.]
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) (i) State and explain quick sort. Perform it with the following combinations. Pivot: First element, Last element. (8) [Transcription note: No input sequence is printed for this subquestion.] (ii) Sort the sequence 3,1,4,1,5,9,2,6,5 using insertion sort. Show the content of the array after every iteration of the sort. (5) (OR) (b) (i) Distinguish between linear and binary search with example. (6) (ii) Show the heap sort process to the following input sequence 142,543,123,65,453,879,572,434,111,242,811,102. (7)
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) Create nested structures to store name, id, pay, and deductions for the set of 100 employees in an organization. Given pay and deductions are monthly details, same for all the months. The deductions include GPF, FBF and SPF. Write a C program to calculate income tax to be paid if total income exceeds 1 lakh with tax as 20% of the excess amount and 30% if total exceeds 3 lakhs. Print the report with name, id, and tax to be paid. (OR) (b) Suppose we know the preorder and postorder traversal sequences of a binary tree T. (i) Can we uniquely determine the binary tree? Justify. (3+6+6) (ii) Suppose we know that all the non-leaf nodes of T have two children. Explain, using an algorithm, on how we can recover T from the two sequences. (iii) Let the preorder traversal sequence of T be 100,34,16,9,8,38,11,4,81 and postorder traversal sequence be 34,9,11,4,38,81,8,16,100. If all the non-leaf nodes of T have two children, identify T.
No verified answer or solution is available for this question.