Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

C-style multi line comment

From Coderwiki
Revision as of 22:14, 8 August 2025 by Dylan (talk | contribs) (C-style multi line comment: create)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

C-style comments can be either single-line or multi-line

Multi-line comments begin with a forward-slash then an asterisk /*.

The comment ends with an asterisk then a forward slash */.

Example of a C-style single-line comment

/*
This is a multi-line comment
They start with a / then a * ...
... and end with a * then a /
*/

/* it's often convention to start each new line in
 * a multi-line comment with an asterisk (*) to
 * maintain formatting. */