14 balanced parenthese a string of characters has balanced parentheses ifeach right 5347099
14: Balanced Parenthese A string of characters has balanced parentheses ifeach right parenthese occuring in a string is matched with apreceding left parenthesis, in the same way that each right bracein a C++ program is matched with a preceding left brace. Write aprogram that uses a stack to determine whether a string entered atthe keyboard has balenced parenteses. Here are some hints on how the program flows: Checks tosee if a string has balanced parenthesis. Stack each leftparenthesis as it is found, and then pop it off the stack whenits mate is encountered. The string is not balanced if uponencountering a right parenthesis, the top of the stack is nota left parenthesis, or if we get to the end of the string andthe stack is not empty