Why Comments are important?

Why Comments are important?

Comments are important because:
  • Anyone can understand which variables you declared and what are uses of those variables in your program.
  • Documentation.
  • Even when you see your own program after 2 to 3 months you can't recollect for which reasons you used which variables. So, you can refer your comments.
In C language, comments are given by either //...// or /*...*/
If you want single line comment, you must use //...//
For multi-line comment use /*...*/

Image result for comments in c


Summary:
It is good practice to declare comments as it helps developer.
Comments are ignored by compiler.
If you want single line comment, you must use //...//
For multi-line comment use /*...*/

4 comments:

  1. I am thankful to you for sharing a lot of useful information. I found this resource utmost beneficial for me. Thanks a lot for your hard work.Manufacturing Software Company in India

    ReplyDelete
  2. Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.Regularly scheduled programming

    ReplyDelete
  3. Inspirational to hear someone pursuing their dreams and becoming successful instead of following the traditional path. I have read your article about this topic. I think it's good and impressive to know your service. Thanks for sharing this information.ERP software for Textile Industries

    ReplyDelete