Comments in C
Generally, Comments are used to provide a description of the logic written
in Program. They are not displayed output screen. They are ignored by the
Compiler in C Language. There are two types of comments:-
1. Single line comment:-Single line comment can be provided by using the //
symbol. After this symbol, we write our comment in a single line.
2. Multi-line comments:-Multiline comments can be provided by using the /*
symbols. In this, we use these symbol to write comments in more than one line. Like
below:-
/*
-------------
--------------
--------------
*/
Rules for Writing comment:
- The program contains any number of comments at any place.
- Nested comments are not allowed, that means comment within the comment.
- Comment can be split over than one.
- Comments are not case sensitive.
- With the help of comments, a Programmer can write a description of his program.
- With the help of the comments, a programmer can explain their logic in the program.
- It also can write any specific information.
You can also visit:-