Comments in C

tutorial and example
tutorial and example

Comments are used to comment the line of code in program.Comments are a way of inserting remarks and reminders into code without affecting its behavior.The compiler ignores comments, treating them as though they were whitespace.

There are two types of comments:

  1. Single Line Comments
  2. Multiple Line Comments

Single Line Comments:

Single line comment is used to comment the single line of program code. The double slash (\\) is used to comment single line.

Syntax:

Example

Multiple Line Comment

Multiple line comments are used to comment multiple line code of the program.

The given syntax is used to comment multiple lines.

 Syntax:

Example