```c /* The main thing that this program does. */ int main(void) { return 0; } ``` A comment is source text that the C compiler ignores as non-executable documentation. It can explain what code does, why it does it, or how an implementation is organized. section 2.1 section 10.0
C provides two comment forms and assigns documentation different jobs:
- Block comments use `/* ... */`; everything between the delimiters is treated as a comment, even when it spans lines. section 2.1
- C++-style comments begin with `//` and continue to the end of the line. section 2.1
- Interface comments document a function's purpose; implementation comments explain the manner in which its details work. section 10.0
A comment can preserve the reason behind an operation
```c /* 33 and 28 are suitable because they are coprime. */ u = nextApprox(u, i, 33, 28); /* Theorem 3 ensures that we may move to the next step. */ ++i; ``` The executable statements remain visible, while the comments record assumptions and rationale that improve readability and comprehensibility. section 10.0
1 /* 33 and 28 are suitable because they are coprime. */
2 u = nextApprox(u, i, 33, 28);
3 /* Theorem 3 ensures that we may move to the next step. */
4 ++i;
!@%STYLE%@!
{"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":0},{\"line\":0,\"ch\":1}],[{\"line\":0,\"ch\":14},{\"line\":0,\"ch\":15}],[{\"line\":1,\"ch\":0},{\"line\":1,\"ch\":1}],[{\"line\":0,\"ch\":7},{\"line\":0,\"ch\":8}],[{\"line\":1,\"ch\":25},{\"line\":1,\"ch\":26}],[{\"line\":2,\"ch\":0},{\"line\":2,\"ch\":1}],[{\"line\":3,\"ch\":0},{\"line\":3,\"ch\":1}]]"}
!@%STYLE%@!
Inspect the worked listing to compare explanatory block comments with the code they accompany. section 10.0









