K&R C Exercise 1-24: Rudimentary C Syntax Checker

Exercise 1-24. Write a program to check a C program for rudimentary syntax errors like unmatched parentheses, brackets, and braces. Don’t forget about quotes, both single and double, and comments. (This is hard to do in full generality.) Approach The obvious approach — keep a counter for each bracket type and check it reaches zero …