+2

In c++ programming Is it necessary to write comments?

C++

10/20/2019 1:28:54 AM

Preeti

5 Answers

New Answer

+6

Hi Preeti. Code needs to be EXPLICATE. Comment are helpful to make what certain parts the code do. Comments help speed up the process of understand your code in the future, and when others view your code.

+2

It is never necessary in any programming language to write comments, but it is recommended for long codes.

+1

In long run, sometimes when you come back to add more features or modify some old features of code, if comments would have been there, it would make lot easier to revist code quickly with banging the head. Imagine if no comments were put in code where, with your own code you won't be able to recall what you had done. You will keep scratching your head to recall all logic that you had written. So a wise coder will always put comments to save his and others time 😃

0

It's not necessary but you can explain the code what it does using comment

0