Comments in C

  • Comments are used to give the description about the code.These are not executed by the compiler or interpreter.

  • Any number of comments can be written at any place in the program.

  • There are 2 types of comments:

  1. Single line comment- Represented by // (double forward slash).

Example: //This is a comment.

  1. Multi line comment- Represented by /* anytext */.

Example: /*Hello

This is a multiline


  • Note: Comments cannot be nested.