Comments In C

Here is how to define comment in C.

If you don’t know what is comment, first read my article on it.
There are two types of comments in C.
1) Single line Comments
2) Multi-line Comments
1) Single Line Comment:
We use ‘//’ double forward slash for defining single line comment in C.
As the name suggest, the compiler skips that single line after which ‘//’ are defined.
Let’s see an example:
b=a; //value of a is now in b
Here, the statement ‘value of a is now in b’ are after ‘//’ so, it will skipped by compiler.
2) Multi-Line Comment:
In C, we define Multi-line comment within ‘/*’ and ‘*/’.
For example:
a=b;
/* As we saw before b had same value as a
But now a has same value as be*/
Here, the compiler will skip the whole statement within ‘/* */’
So this was all what you need to know about Comments of C.

Related Posts with Comments In C