// Anna University, Chennai / 2024
Anna University — C Programming and Data Structures (CS3353), April/May 2024
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 is recursive function?
No verified answer or solution is available for this question.
C Programming and Data Structures
When is the ternary operator used?
No verified answer or solution is available for this question.
C Programming and Data Structures
State the usage of the union in C.
No verified answer or solution is available for this question.
C Programming and Data Structures
What are preprocessor directives?
No verified answer or solution is available for this question.
C Programming and Data Structures
What are Abstract Data Types (ADT)?
No verified answer or solution is available for this question.
C Programming and Data Structures
State the applications of queue.
No verified answer or solution is available for this question.
C Programming and Data Structures
When is rehashing necessary?
No verified answer or solution is available for this question.
C Programming and Data Structures
What is an expression tree?
No verified answer or solution is available for this question.
C Programming and Data Structures
What are the limitations of linear search?
No verified answer or solution is available for this question.
C Programming and Data Structures
What is the fundamental concept of merge sort?
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) (i) Why we use functions in C languages. Give example. (6 marks) (ii) Write both iterative and recursive functions in C to evaluate a^b. (7 marks) (OR) (b) (i) What are the different types of control statements? Explain with example. (6 marks) (ii) Write a C program that computes the sum of the following series up to n terms: 1 − x²/2! + x⁴/4! − x⁶/6! + … (7 marks)
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) Write C functions to perform the following operations with two-dimensional arrays. (i) Reading any two-dimensional array elements. (3 marks) (ii) Find the sum of odd and the even array elements. (3 marks) (iii) Finding maximum and minimum of array elements. (3 marks) (iv) Printing the transpose. (4 marks) (OR) (b) Explain the structure, nested structure, and self-referential structure with examples.
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) Explain the stack ADT. State and explain the different representation of stack with example. (OR) (b) Explain the procedure for converting an infix expression to a postfix expression using a stack. Convert the following infix expression into a postfix expression: x * (w + y / 2 * x ^ (4 + x)), and evaluate the obtained postfix expression using the values (x = 1, y = 2, w = 3).
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) State and explain the array and linked implementations of a binary search tree with pseudo code and an example. (OR) (b) Consider the binary search tree provided in Figure 1. Perform the following operations: (i) Determine the results of in-order, pre-order and post-order traversals. (4 marks) (ii) Insert the nodes 12, 22, 33, 44, and 55. (4 marks) (iii) Demonstrate the deletion of the node 43. (5 marks)

Figure 1 — binary search tree for Q14(b) No verified answer or solution is available for this question.
C Programming and Data Structures
(a) Explain the basic idea behind insertion sort and how it works. Illustrate with pseudo code and a suitable example. (OR) (b) Distinguish between min heap and max heap. Show how heap sort processes the input 142, 543, 123, 65, 453, 879, 572, 434, 111, 242, 311 and 102.
No verified answer or solution is available for this question.
C Programming and Data Structures
(a) Given input {4371, 1323, 6173, 4199, 4344, 9679, 1989} and a hash function h(x) = x mod 10, show the resulting: (i) Separate chaining hash table. (3 marks) (ii) Open addressing hash table using linear probing. (4 marks) (iii) Open addressing hash table using quadratic probing. (4 marks) (iv) Open addressing hash table with second hash function h₂(x) = 7 − (x mod 7). (4 marks) (OR) (b) Sort the sequence 4, 6, 8, 2, 9, 5, 1, 7 and 3 using the following: (i) Merge sort. (8 marks) (ii) Quick sort (picking the first element as the pivot). (7 marks)
No verified answer or solution is available for this question.