Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What should be done when an opening parentheses is read in a balancing symbols algorithm?

a) push it on to the stack
b) throw an error
c) ignore the parentheses
d) pop the stack

Answer: a
Explanation: When an opening bracket/braces/parentheses is encountered, it is pushed on to the stack. When the corresponding end bracket/braces/parentheses is not found, throw an error.

Join The Discussion