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 single line comment

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

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

Single-line comments begin with a double forward-slash //.

The comment ends automatically at the end of a line.

Example of a C-style single-line comment

edit edit source
// this is a full-line C-style comment
int a = 5; // you can also place them at the end of a statement