10,022 views
28 votes
28 votes

To evaluate an expression without any embedded function calls

  1. One stack is enough
  2. Two stacks are needed
  3. As many stacks as the height of the expression tree are needed
  4. A Turing machine is needed in the general case

6 Answers

0 votes
0 votes
ans a)
0 votes
0 votes

To evaluate an expression without any embedded function calls, one stack is enough.

Explanation:

  • In an expression evaluation, a single stack is typically used to keep track of operands and operators.
  • The stack helps maintain the correct order of operations and ensures that the expression is evaluated according to the rules of precedence and associativity.
Answer:

Related questions

29 votes
29 votes
3 answers
1
Kathleen asked Sep 15, 2014
11,487 views
The performance of a pipelined processor suffers if:the pipeline stages have different delaysconsecutive instructions are dependent on each otherthe pipeline stages share...
28 votes
28 votes
4 answers
3
Kathleen asked Sep 15, 2014
6,883 views
Dynamic linking can cause security concerns becauseSecurity is dynamicThe path for searching dynamic libraries is not known till runtimeLinking is insecureCryptographic p...
22 votes
22 votes
5 answers
4
Kathleen asked Sep 15, 2014
10,586 views
Four fair coins are tossed simultaneously. The probability that at least one head and one tail turn up is$\frac{1}{16}$$\frac{1}{8}$$\frac{7}{8}$$\frac{15}{16}$