QP School

Full Version: Commenting out a block of code in C
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Example:

/*
int x = 10;
int y = 20;
int z = x + y;
*/

Explanation:

Multi-line comments are often used to comment out a block of code.
In this example, the block of code between /* and */ is commented out and won't be compiled or executed.
This can be helpful when temporarily disabling a section of code during testing or debugging.