0 day streak
c / beginner
Snippet

Single and Multi-line Comments

Comments are notes for developers that are completely ignored by the compiler. Use // for short notes and /* */ for notes spanning multiple lines.

snippet.c
c
1
2
3
// Standard comment
/* This is a
longer comment */
Breakdown
1
// Standard comment
Everything following // on the same line is ignored.
2
/* ... */
Everything between these markers is ignored, even across multiple lines.