Tutorial by Examples

A comment starts with a forward slash followed immediately by an asterisk (/*), and ends as soon as an asterisk immediately followed by a forward slash (*/) is encountered. Everything in between these character combinations is a comment and is treated as a blank (basically ignored) by the compiler. ...
C99 C99 introduced the use of C++-style single-line comments. This type of comment starts with two forward slashes and runs to the end of a line: // this is a comment This type of comment does not allow multi-line comments, though it is possible to make a comment block by adding several single ...
Large chunks of code can also be "commented out" using the preprocessor directives #if 0 and #endif. This is useful when the code contains multi-line comments that otherwise would not nest. #if 0 /* Starts the "comment", anything from here on is removed by preprocessor */ /*...
C99 While writing // delimited comments, it is possible to make a typographical error that affects their expected operation. If one types: int x = 20; // Why did I do this??/ The / at the end was a typo but now will get interpreted into \. This is because the ??/ forms a trigraph. The ??/ tri...

Page 1 of 1