1.

When the corresponding end bracket/braces/parentheses is not found, what happens?(a) The stack is popped(b) Ignore the parentheses(c) An error is reported(d) It is treated as an exceptionMy question is taken from Application of Stacks topic in division Application of Stacks of Data Structures & Algorithms II have been asked this question in class test.

Answer» CORRECT option is (C) An ERROR is reported

Best explanation: When the corresponding END bracket/braces/parentheses is not found, throw an error since they don’t match.


Discussion

No Comment Found

Related InterviewSolutions