Write a program to implement Algorithm 3-9, “Parse Parentheses,” matching braces rather than parentheses. In your implementation, push the line number into the stack rather than the opening brace. When an error occurs, print the line number for the unmatched opening brace or unmatched closing brace. Test your program by running the source code through itself (there should be no errors) and then test it with the following small program:
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here