Poll: Was this article helpful for you?
You do not have permission to vote in this poll.
Yes
100.00%
1 100.00%
No
0%
0 0%
Total 1 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi Line Comments in C 18
#1
Multi line comments span over two or more lines and are ignored by the compiler.
In C they start with a slash and an asterisk /* and they end with an asterisk and a slash */.
In this case we do NOT need a semicolon at the end of the line.
Example:

#include <stdio.h>

int main()
{
    /*
    This is
    a multi
    line comment
    */

    return 0;
}
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 351 07-26-2023, 07:28 AM
Last Post: Qomplainerz
  Nested multi-line comments in C Qomplainerz 0 269 07-26-2023, 07:27 AM
Last Post: Qomplainerz
  Multi-Line comment within code in C Qomplainerz 0 272 07-26-2023, 07:26 AM
Last Post: Qomplainerz
  Multi-line comments in C Qomplainerz 0 340 07-26-2023, 07:24 AM
Last Post: Qomplainerz
  Commenting out a part of a line in C Qomplainerz 0 344 07-26-2023, 07:19 AM
Last Post: Qomplainerz
  Single-Line comments in C Qomplainerz 0 349 07-26-2023, 07:16 AM
Last Post: Qomplainerz
  Command-Line Arguments in C Qomplainerz 0 293 07-25-2023, 01:27 PM
Last Post: Qomplainerz
  Multi-dimensional arrays in C Qomplainerz 0 270 07-25-2023, 11:40 AM
Last Post: Qomplainerz
  Single Line Comments in C 18 Qomplainerz 0 1,711 04-06-2022, 02:22 PM
Last Post: Qomplainerz

Forum Jump:


Users browsing this thread: 3 Guest(s)