Something
public text v1 · immutable#include <stdio.h>
/* remove comments from C source */
main()
{
char c, lc;
int incom;
while ((c = getchar()) != EOF) {
printf("while c = %c\n",c);
if (!(c == '/') && (incom == 1)) {
printf("L%cC:%c\n", lc, c);
if (lc == '*' && c == '/') {
incom = 0;
printf("HIIIIIIIIIIIIIIIIIII");
}
}
else if (lc == '/' && c == '*') {
incom = 1;
}
else if (lc =='/' && incom == 0) {
printf("else if %c\n", c);
}
else {
incom = 0;
printf("else %c\n", c);
}
lc = c;
}
}