QP School
Single-Line comments in C - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: C 18 Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=32)
+--- Thread: Single-Line comments in C (/showthread.php?tid=5124)



Single-Line comments in C - Qomplainerz - 07-26-2023

In C, single-line comments are used to add explanatory notes or comments to the code that are ignored by the compiler. They begin with the double forward slash // and continue until the end of the line.

Example: Basic Single-Line Comment

// This is a single-line comment

Explanation:

In this example, the single-line comment starts with //.
Anything after // on the same line is considered a comment and is ignored by the compiler.
This comment serves as a simple explanatory note for the code.