QP School
Commenting out a part of a line 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: Commenting out a part of a line in C (/showthread.php?tid=5128)



Commenting out a part of a line in C - Qomplainerz - 07-26-2023

Example:

int x = 10; // Initialize x to 10
int y = 20; // Initialize y to 20
// int z = x + y; // This line is commented out

Explanation:

Single-line comments can be used to comment out a portion of a line, rather than the entire line.
In this example, the third line is partially commented out to exclude the calculation of z.