Comment | Sololearn: Learn to code for FREE!



Why we use single and double line comments in a program?


2/7/2020 11:46:36 AM

Muhammad Nazam

1 Answer

New Answer


A single line comment doesn't remain a comment as soon as you press enter to move on a new line. So if you use a single line comment then make sure that you keep it short, preceded by //. /* On the other hand if you have a couple of sentences or paragraphs which are to be commented, you can make use of the multi line comment. This is a multi line comment from the beginning of the last paragraph */