commentscomments are integral part of every


Comments

Comments are integral part of every program . Comments help in coding, debugging and maintaining a program . The compiler ignores them. They should be used liberally in the program .

In C++, a comment begins with two forward slashes ( // ) and ends with the end of that line. A comment can start at the beginning of the line or on a line following the program statement. This form of giving comments is certainly useful for the short line comments. If a comment continues on more than a line, the two forward slashes should be given on every line.

The C style of giving a comment is also available in C++. This style ( /*....*/) is mainly useful when the comment spans more than a line.

e.g.

                void main()

                 {

                                /* this is a good old style of giving

           a comment. It can be continued to

next line and has to be ended with */

 

                      clrscr();           // Clears the Screen

                                 init()_; // Initialize variables.

                                                :

                                :

                 }

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: commentscomments are integral part of every
Reference No:- TGS0309336

Expected delivery within 24 Hours