K&R C Exercise 1-23: Remove Comments from a C Program

Exercise 1-23. Write a program to remove all comments from a C program. Don’t forget to handle quoted strings and character constants properly. C comments don’t nest. Approach The core challenge is that the same character sequence means completely different things depending on context. A /* inside a string literal is not a comment. A …