+ 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?....?
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;
}
+ 6
Comments are ignore by complier.
+ 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
+ 1
Comments are used for yourself to understand your code later.
0
You write them for Easter eggs, developers notes if team project, and to remember stuff