If you read the comments at the beginning of the solution it explains why you're seeing that error:
It also contains examples of a comment that ends in a star and a comment preceded by a slash. Note that the latter will break C99 compilers and C89 compilers with // comment extensions.
In a compiler that does not support //
style comments, this:
putchar('/' //**/
1)
Is equivalent to:
putchar('/'/1)
Which is legal -- though odd -- expression (remember that in C a char
is a numeric type, so '/'/1
is the same as /
). This happens because the sequence /**/
is an empty comment.
In a modern compiler with //
style comments, the expression ends up being equivalent to:
puchar('/' 1)
Which is simply an error.