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

/*
    This is the outer comment.
    /* This is a nested comment. */
    It is ignored as well.
*/

Explanation:

C allows nesting of multi-line comments.
In this example, an inner multi-line comment /* This is a nested comment. */ is placed within the outer comment.
The compiler ignores both the outer and inner comments.
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 338 07-26-2023, 07:28 AM
Last Post: Qomplainerz
  Multi-Line comment within code in C Qomplainerz 0 262 07-26-2023, 07:26 AM
Last Post: Qomplainerz
  Multi-line comments in C Qomplainerz 0 331 07-26-2023, 07:24 AM
Last Post: Qomplainerz
  Commenting out a part of a line in C Qomplainerz 0 337 07-26-2023, 07:19 AM
Last Post: Qomplainerz
  Single-Line comments in C Qomplainerz 0 337 07-26-2023, 07:16 AM
Last Post: Qomplainerz
  Command-Line Arguments in C Qomplainerz 0 281 07-25-2023, 01:27 PM
Last Post: Qomplainerz
  Nested structures in C Qomplainerz 0 227 07-25-2023, 01:10 PM
Last Post: Qomplainerz
  Multi-dimensional arrays in C Qomplainerz 0 261 07-25-2023, 11:40 AM
Last Post: Qomplainerz
  Multi Line Comments in C 18 Qomplainerz 0 812 04-06-2022, 02:24 PM
Last Post: Qomplainerz
  Single Line Comments in C 18 Qomplainerz 0 1,701 04-06-2022, 02:22 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 6 Guest(s)