adspace


What are the comments in c++?

Answer Posted / Manish Kumar Jain

Comments in C++ are used to provide explanations or notes within the code. They do not affect the program's execution.nn1) Single-line Comment: A single-line comment starts with two forward slashes (//). Everything after the double slash on that line is considered a comment and ignored by the compiler.nExample:n```cppn // This is a single-line commentn```n2) Multiline Comment: Multiline comments are enclosed between /* and */. These can span multiple lines and are useful for longer explanations or sections of code that you want to temporarily disable without deleting.nExample:n```cppn /* This is a multiline comment
This can span multiple lines
*/n```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

daily Routine of father

1483


Can union be self referenced?

1265


What is the latest version on c++?

1205


What character terminates all character array strings a) b) . c) END

1394


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1164