comments in c programming language is used to increase ths readablity of any program.Comments will not affect any thpe of program because comments are ignored by compiler.There are normally two type of comments in c programming language.
1.Single line comment
2.Multi line comment
1.Single line comment
Single line comment is used in comment which will take only one line or it is short comment.Single line comment will start with "//" sign and single line comment will end with new line.Now let us see the example of single line comment.
Example:
// this is the valid single line comment
int a=4; //the value of a is defined
float b; //the datatype used is float
2.Multi line comment
multi line comment is used to comment which will take more than 1 line or which is long in length.multi line comment will start with "/*" and it will end with "*/".Now let us see example of multi line comment.
Example:
/*programmer: Aadarsh sojitra
Name: program to add two numbers
file name: addition.c
*/
1.Single line comment
2.Multi line comment
1.Single line comment
Single line comment is used in comment which will take only one line or it is short comment.Single line comment will start with "//" sign and single line comment will end with new line.Now let us see the example of single line comment.
Example:
// this is the valid single line comment
int a=4; //the value of a is defined
float b; //the datatype used is float
2.Multi line comment
multi line comment is used to comment which will take more than 1 line or which is long in length.multi line comment will start with "/*" and it will end with "*/".Now let us see example of multi line comment.
Example:
/*programmer: Aadarsh sojitra
Name: program to add two numbers
file name: addition.c
*/