What are the comments in c++?



What are the comments in c++?..

Answer / 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

More C++ General Interview Questions

Do you know about latest advancements in C++ ?

1 Answers   Agilent, ZS Associates,


Name the debugging methods that are used to solve problems?

1 Answers  


what do you mean by memory management operators

4 Answers   HCL,


Explain pass by value and pass by reference.

1 Answers  


Difference between Overloading and Overriding?

35 Answers   Appnetix Techno, GameLoft, HP, IBM, NIIT, Rohde and Schwarz,


What are libraries in c++?

1 Answers  


What is different in C++, compare with unix?

1 Answers  


How do I exit turbo c++?

1 Answers  


Is there any difference between int [] a and int a [] in c++?

1 Answers  


Explain virtual functions in C++.

3 Answers  


How should a contructor handle a failure?

1 Answers  


What is vector processing?

1 Answers  


Categories