+ 1

What is the uses of //comments? We didn't see it on output...

//.....// and /*.........*/ are used in HTML ,CSS ,js however this tags are used for comments . but I can't see comments in output why..? and what us comment?....?

17th Apr 2017, 9:16 AM
Vigneshwar
6 Answers
+ 11
You write comments because you want to remember what you did, and why. The compiler/interpretor will ignore comments. E..g. int main() { cout << "COOKIES" << endl; // I wrote this because I love cookies. return 0; }
17th Apr 2017, 9:31 AM
Hatsy Rei
Hatsy Rei - avatar
+ 6
Comments are ignore by complier.
17th Apr 2017, 9:32 AM
Nithiwat
Nithiwat - avatar
17th Apr 2017, 10:10 AM
à€Šà„‡à€”à„‡à€‚à€Šà„à€° à€źà€čà€Ÿà€œà€š (Devender)
à€Šà„‡à€”à„‡à€‚à€Šà„à€° à€źà€čà€Ÿà€œà€š (Devender) - avatar
+ 2
this comments for describing your parts of code, because you can't remember it forever, and you can leave comment for other developers for easy understanding
17th Apr 2017, 9:21 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar
+ 1
Comments are used for yourself to understand your code later.
17th Apr 2017, 9:17 AM
merkrafter
0
You write them for Easter eggs, developers notes if team project, and to remember stuff
18th Apr 2017, 2:20 PM
Legowegogo
Legowegogo - avatar