Skip to content

// 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.

Questions

16

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16

Has an official figure

Work through the questions

16 questions

No verified answers are available for this paper.

  1. Question 1

    Part AUnit 1Descriptive2 marks

    C Programming and Data Structures

    What is recursive function?

    No verified answer or solution is available for this question.

  2. Question 2

    Part AUnit 1Descriptive2 marks

    C Programming and Data Structures

    When is the ternary operator used?

    No verified answer or solution is available for this question.

  3. Question 3

    Part AUnit 2Descriptive2 marks

    C Programming and Data Structures

    State the usage of the union in C.

    No verified answer or solution is available for this question.

  4. Question 4

    Part AUnit 2Descriptive2 marks

    C Programming and Data Structures

    What are preprocessor directives?

    No verified answer or solution is available for this question.

  5. Question 5

    Part AUnit 3Descriptive2 marks

    C Programming and Data Structures

    What are Abstract Data Types (ADT)?

    No verified answer or solution is available for this question.

  6. Question 6

    Part AUnit 3Descriptive2 marks

    C Programming and Data Structures

    State the applications of queue.

    No verified answer or solution is available for this question.

  7. Question 7

    Part AUnit 4Descriptive2 marks

    C Programming and Data Structures

    When is rehashing necessary?

    No verified answer or solution is available for this question.

  8. Question 8

    Part AUnit 4Descriptive2 marks

    C Programming and Data Structures

    What is an expression tree?

    No verified answer or solution is available for this question.

  9. Question 9

    Part AUnit 5Descriptive2 marks

    C Programming and Data Structures

    What are the limitations of linear search?

    No verified answer or solution is available for this question.

  10. Question 10

    Part AUnit 5Descriptive2 marks

    C Programming and Data Structures

    What is the fundamental concept of merge sort?

    No verified answer or solution is available for this question.

  11. Question 11

    Part BUnit 1Descriptive13 marks

    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.

  12. Question 12

    Part BUnits 1, 2Descriptive13 marks

    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.

  13. Question 13

    Part BUnit 3Descriptive13 marks

    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.

  14. Question 14

    Part BUnit 4Descriptive13 marks

    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)

    Official figure for question 14
    Figure 1 — binary search tree for Q14(b)

    No verified answer or solution is available for this question.

  15. Question 15

    Part BUnit 5Descriptive13 marks

    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.

  16. Question 16

    Part CUnits 4, 5Descriptive15 marks

    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.

Keep preparing

Revisit another year or explore a different paper in the library.

More from this exam