Home » C++ programming language

C++ Single & Multiline comments

Comments are pieces of source code discarded from the code by the compiler. They do nothing. Their purpose is only to allow the programmer to insert notes or descriptions embedded within the source code.

C++ introduces a new comment symbol // (double slash), comments starts with a double slash symbol and terminate at the end of line.

Types of C++ comments

  1. Single line comment
    // your comment goes here...
  2. Multi line comment
    /* your comment goes here... */

Comments using single line comment symbol

    // This is an example to print Hello.
    // Author : includehelp.com. 
    // Date : 13-02-2012.

Comments using multi line comment symbol

     /* This is an example to print Hello.
        Author : includehelp.com. 
        Date : 13-03-2012.
     */





Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.