0

What is difference between single line comment and multi line comment?

26th Feb 2017, 4:10 PM
Bishwanath Yengkhom
Bishwanath Yengkhom - avatar
7 Answers
+ 3
To explain your code for better clarity and also to store code which you feel isn't necessary now but might find it useful later
26th Feb 2017, 4:19 PM
Chirag Bhansali
Chirag Bhansali - avatar
+ 2
@biswanath: no difference! Just depends what you want to use where
26th Feb 2017, 4:17 PM
Chirag Bhansali
Chirag Bhansali - avatar
+ 1
like you are working on a group on some project, on your part code you write comments to make it clear for other members so that they don't need to read whole code to understand what is going on there.
26th Feb 2017, 4:22 PM
Raj Kumar Chauhan
Raj Kumar Chauhan - avatar
0
then what is the used of that comment.. I mean it doesn't display on the output
26th Feb 2017, 4:18 PM
Bishwanath Yengkhom
Bishwanath Yengkhom - avatar
0
The single line, you are allowed to only have a short line, up to one line. Multi line is when you have a text that content more than 1 line.
16th Mar 2017, 5:49 PM
camila
0
single line for short description and u can start it with // and multiple line \*and ends *\
14th Jun 2017, 4:29 PM
Yogesh
0
Even I got doubt in this .. there is no change in output .will get same with both comments..And also why we have to used these comment in programm what is the use of it ..can anyone explain it clearly
31st May 2021, 6:52 AM
Varshitha Y S
Varshitha Y S - avatar