Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi-line comments in C
#1
Description:

In C, multi-line comments (also known as block comments) allow you to add comments that span multiple lines. Multi-line comments begin with /* and end with */. Anything between /* and */ is considered a comment and is ignored by the compiler.

Example:

/*
    This is a multi-line comment.
    It can span multiple lines and is ignored by the compiler.
    It is used for adding detailed explanations or large comment blocks.
*/

Explanation:

In this example, the multi-line comment starts with /*.
The comment content can span multiple lines.
The comment is terminated with */.
Anything between /* and */ is considered a comment and is not processed by the compiler.
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
  Using multi-line comments for explanations in C Qomplainerz 0 359 07-26-2023, 07:28 AM
Last Post: Qomplainerz
  Nested multi-line comments in C Qomplainerz 0 275 07-26-2023, 07:27 AM
Last Post: Qomplainerz
  Multi-Line comment within code in C Qomplainerz 0 274 07-26-2023, 07:26 AM
Last Post: Qomplainerz
  Commenting out a part of a line in C Qomplainerz 0 350 07-26-2023, 07:19 AM
Last Post: Qomplainerz
  Single-Line comments in C Qomplainerz 0 357 07-26-2023, 07:16 AM
Last Post: Qomplainerz
  Command-Line Arguments in C Qomplainerz 0 295 07-25-2023, 01:27 PM
Last Post: Qomplainerz
  Multi-dimensional arrays in C Qomplainerz 0 273 07-25-2023, 11:40 AM
Last Post: Qomplainerz
  Multi Line Comments in C 18 Qomplainerz 0 827 04-06-2022, 02:24 PM
Last Post: Qomplainerz
  Single Line Comments in C 18 Qomplainerz 0 1,715 04-06-2022, 02:22 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 1 Guest(s)