| |
|
C Comments
Comments are used to provide some information about lines of code. Which helps developer to understand later on why this code is written or do some other information bind with that code. Or in another language we can say that it is widely used for documenting code. There are 2 types of comments in C language.
(1)Single Line Comments
(2)Multi-Line Comments
(1)Single Line CommentsHere in Single Line Comments which is represented by double slash \\. In below example we have given example for single line comments.
Output:-
Hello Welcome
Here in above code we can also add comments in single line with code too as given below
(2)Multi Line CommentsHere we will write multi line comments which is represented by slash asterisk \* ..... *\. Here this will occupy many lines of code. But it will not have nested syntax.
Output:-
Hello Welcome | |
|
|
|
|