R

Rudra Pratap Singh • 3.39K Points
Extraordinary

Q. How to write a comment on a single line?

  • (A) /* my comment */
  • (B) // my comment //
  • (C) // my comment
  • (D) All of the above

Explanation by: Rudra Pratap Singh
If your comment is short, you should use a double slash (//) followed by your comment. For example:

// this is a comment

If your comment is long, type your comment between (/* and */). For example:
/* this is a 
multi-line 
comment */

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics