Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Commenting out a block of code in C
#1
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.
Also follow me on Youtube for videos about video games:
https://www.youtube.com/channel/UCxfkGVU...2mQ/videos
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Multi-Line comment within code in C Qomplainerz 0 259 07-26-2023, 07:26 AM
Last Post: Qomplainerz
  Commenting out a part of a line in C Qomplainerz 0 335 07-26-2023, 07:19 AM
Last Post: Qomplainerz
  Single-Line comment within code in C Qomplainerz 0 281 07-26-2023, 07:18 AM
Last Post: Qomplainerz
  Inline comment for code explanation in C Qomplainerz 0 326 07-26-2023, 07:18 AM
Last Post: Qomplainerz
  Commenting out code in C Qomplainerz 0 307 07-26-2023, 07:17 AM
Last Post: Qomplainerz
  Writing clean and maintainable code in C Qomplainerz 0 230 07-25-2023, 01:31 PM
Last Post: Qomplainerz
  Code optimization tips in C Qomplainerz 0 299 07-25-2023, 01:31 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 5 Guest(s)