DIGIT-ARC read-only archive · snapshot: July 23, 2026

write C prgm to delete comments in in any C prgm

4 posts · originally from https://geek.digit.in/community/threads/write-c-prgm-to-delete-comments-in-in-any-c-prgm.125062/

openSUSE
openSUSE Original post #1
Mar 13, 2010 at 12:44 PM
hi..friends ....
could u please help me to write this prgm ...........:idea:
G
Apr 6, 2010 at 8:26 PM
google for it
A
Apr 30, 2010 at 10:50 AM
a simple approach would be to search for '/*' and then go on removing characters till you find a '*/' ..

its that simple ... (provided you are familiar with file handling).
cooldip10
May 9, 2010 at 10:42 PM
Very simple program.
Use file handling properly.

using fscanf() traverse word by word.
Check whether you encountered "/*".
if yes -> skip till you get "*/".
else -> continue copying.