Question: A well-formed string of parentheses is a character string that contains only the left and right round parentheses (' ( ' and ' ) '),

A well-formed string of parentheses is a character string that contains only the left and right round parentheses (' ( ' and ' ) '), the left and right braces ( { ' and ' } '), and the left and right square brackets ('[' and ' ] '), and for each of the left parenthesis, there is a corresponding right parenthesis at the correct position. The following are examples of well-formed strings of parentheses: O O[O] [{{0[O]}}0] The following are not well-formed string of parentheses: ( O[ [] O({) Write a program that makes use of a stack to check whether a string of characters is a well-from string of parentheses. - You may assume that the maximum length of a input line is 80 . - You should use the file stack.h defined in the lecture notes. - You may use the file stack.c (any version defined in the lecture notes, and even the version you write in Question 1). Do remember to modify the type stackElementT from int to char
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
