Computer Science EngineeringHard
Tail-call optimization primarily saves
- A. heap space
- B. stack space
- C. register count
- D. source code size
Correct answer: B. stack space
A tail call can reuse the current stack frame, so recursion depth no longer grows the stack.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- In Greibach normal form every production has the form A -> a alpha, where alpha is
- A universal Turing machine is able to
- Which computational model recognizes exactly the class of regular languages?
- Which compiler phase reads the character stream and groups it into tokens?
- How many states are in the minimal DFA over {a, b} that accepts exactly the strings ending in 'ab'?
- The regular expression (a+b) over the alphabet {a, b} denotes