Posted By:
1 Jul, 2013 10:04 am PDT

Comments and their implementation in C/C++

  • What are comments?
  • What is the use of it?
  • Why it is necessary in a program and how to implement in the code?

Comments are very important to a program. They help the user in cracking the logic of a program easily and also in re-usability of the code.

Comments are any text to the right of the // symbol. A comment does not have any effect on the behavior of the program.

Comments are implemented in two ways:


  1. Single line (//)
  2. Multi line (/**/).
Was it useful?  

Please login to reply to this problem.