COMPUTER PROGRAMMING FUNDAMENTALS
5 BASIC ELEMENTS OF PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
*/ Comments */
|
|
Comment
|
|
/* Comment */
|
|
{ Comment }
|
Detailed explanation-1: -/* */ (multiline comment) Multiline comments are used for large text descriptions of code or to comment out chunks of code while debugging applications. Comments are ignored by the compiler.
Detailed explanation-2: -A C++ comment is written in one of the following ways: The /* (slash, asterisk) characters, followed by any sequence of characters (including new lines), followed by the */ characters.
Detailed explanation-3: -Answer: A comment starts with a slash asterisk /* and ends with a asterisk slash */ and can be anywhere in your program. Comments can span several lines within your C program. Comments are typically added directly above the related C source code.
Detailed explanation-4: -1 Answer. For explanation: Both the ways are used for commenting in C++ programming. // is used for single line comments and /* … */ is used for multiple line comments.