Feng H.

asked • 06/17/16

Checking if all parentheses are balanced with a C program

I was trying to write a C program which checks if the parentheses (including brackets and curly braces) are balanced. My current program is on GitHub: https://github.com/testitem/JavaScriptPythonConvertedFiles/blob/master/parenthesesChecker.c - the current program displays nothing while it should display "Error: ] is in wrong place". Can anyone please help me with this? Thanks!
 
Darren

Feng H.

UPDATE: Enter something like ([][]{[()][]})[{}{}({}[])] - it should display " Hooray! It works!"
Report

06/18/16

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.