Question 53

Computer Awareness Stacks Medium

To evaluate an expression without any embedded function calls

(A) one stack is enough
(B) two stacks are needed
(C) as many stacks as the height of the expression tree are needed
(D) a Turing machine is needed in the general case
View Dynamic Solution & Explanation
Correct Solution: Option A

Step-by-step Solution:

To evaluate an expression without any embedded function calls: Using a single stack is sufficient for evaluating expressions without any embedded function calls. The stack allows handling operands, operators, and the order of operations efficiently without requiring additional memory structures. \[\] Correct Option: (a)