Comments in C++

C++ supports single line and multi-line comments. All characters available inside any comment are ignored by C++ compiler.

C++ comments start with /* and end with */. For example:

/* This is a comment */

/* C++ comments can  also

 * span multiple lines


A comment can also start with //, extending to the end of the line. For example:





cout<<“Hello World”;// prints Hello World



Related Posts

© 2023 Software Engineering - Theme by WPEnjoy · Powered by WordPress