COMMENTS

Comments are non-executable code statements. These are always ignored by the compiler, when we compile our program with the help of comments we can give description about the program or any particular statement number of comments can be given in a program. We can have two types of comments.

1. Single line comments

2. Multi line comments

1. Single line comments

These comments are used when we want to display any statement or write any statement in the program for the knowledge of user. We can use single line comments by using double slash (//) symbol.

For example:-

//single line comment

2. Multi line comment

These are used when we want top write numbers of statements which should be ignored by the compiler and also displayed in the program. To display multi line comments we use slash star (/*) in front of the starting line which should be displayed as comment and star slash (*/) at the end of the statement

For example:-

/* …………………….

……………………….

…………………….*/