Skip to content

Data Structures

CSE · Quiz · Fall 24

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Department of Computer Science & Engineering Fall 2024 Quiz 2 Course Title: Data Structure Course Code: CSE123 Time: 40 minutes Marks: 15 Answer all the questions: 1) You are given the following infix expression: A + B * (C ^ D - E) ^ (F + G / H) - I (a) Convert this infix expression to postfix notation using the stack-based algorithm. Show each step of the stack and the output as the algorithm proceeds. (b) After converting the infix expression to postfix, evaluate the resulting postfix expression using a stack, assuming the following values for the operands: A = 5, B = 2, C = 3, D = 2, E = 6, F = 1, G = 8, H = 4, I = 7 [6+4] 2) Following is a linked list having four nodes. Each node has a data part containing a character type data and two pointers pointing to its two neighbor nodes. Show the code segments line-by-line to implement this linked list in C language. [Figure: A doubly linked list with four nodes containing data A, B, C, D, Head pointer, and NULL pointers at both ends] [5] Thank you for your participation