Comments in C
Generally Comments are used to provide the description about the Logic written in program. Comments are not display on output screen. Comments are not read by Compiler.
When we are used the comments, then that specific part will be ignored by compiler.
There are 2 types of comments in C language
1) Single Line Comments
2) Multiple line comments
Single Line Comments
Single line comments can be provided by using / /....................
//this is single line comment
printf("Above line is single line comment");
// printf("value of extern variable %d",myvariable);//printing the value of extern variable myvariable
Above line is single line comment
Mult Line Comments
Multi line comments are represented by slash asterisk \* ... *\. It can occupy many lines of code but it can't be nested. Syntax:
This program created by Durgesh
While learning c
printf("Above line is Multi-line comment");
Above line is Multi-line comment
What next ?
printf() function in c