
Learn core concepts, essential formulas, and attempt practice questions designed on the latest TCS NQT testing patterns.
Convert infix expression 'A + B * C' to postfix:
Correct Answer: A) ABC*+
Step-by-step Solution: Multiplication (*) has higher precedence than addition (+). B * C becomes BC*. Then addition: A + BC* becomes ABC*+.
What is stack state after parsing '{[' in balanced check?
Correct Answer: A) ['{', '[']
Step-by-step Solution: Open brackets are pushed onto the stack in the order they appear. Stack: ['{', '['].
Remember that operators with higher precedence are popped from the stack first during conversions.