Explain comments in c++, C/C++ Programming

Assignment Help:

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.

                                                :

                                :

                 }

 


Related Discussions:- Explain comments in c++

Oop, what is oop?

what is oop?

C++ multiplayer game programming project, C++ Multiplayer Game Programming ...

C++ Multiplayer Game Programming Project Project Description: We are seeking an experienced C++ Game Programmer to enhance clientside related aspects of MCS: Mars City Securi

Tree, Ask question #M i want to undersatnd about tree structures like node ...

Ask question #M i want to undersatnd about tree structures like node leaf etcinimum 100 words accepted#

Project of result management system in c language, how we write decision ta...

how we write decision tables, flowcharts,pseudocode,and algorithm in result management system

Pattern, enter height of the shape: 1 3 5 3 1 3 5 7 5 3 5 7 9 7 5 3 5 7...

enter height of the shape: 1 3 5 3 1 3 5 7 5 3 5 7 9 7 5 3 5 7 5 3 1 3 5 3 1

Program of multipication using inline function, Aim: Write a program of mu...

Aim: Write a program of multipication using inline function class Multiply {           int x,y;           public:           void getdata();           inline calc

Board coloring, in this problem you are given a board in which some of the ...

in this problem you are given a board in which some of the elements are placed as shown in below diagram.each element represent a color.fill the other element in the board,such tha

Pointers to members, P o i n t er s to Members: In C a pointer is...

P o i n t er s to Members: In C a pointer is created  to locate  the address of another variable  for faster access. Consider the following example. int x, *p; p =

Need a solution, Hello. I need a solution for this assignment. It is for C+...

Hello. I need a solution for this assignment. It is for C++ Language: Create a BusinessPartner class that contains a first name, company name, and a telephone number. Create a Con

Minimum shelves, write a c++ program, that finds the minimum total number o...

write a c++ program, that finds the minimum total number of shelves, including the initial one, required for this loading process.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd