Which of the following is used for comments in C++?

a) /* comment */
b) // comment */
c) // comment
d) both // comment or /* comment */

1 thought on “Which of the following is used for comments in C++?”

  1. d
    Explanation: Both the ways are used for commenting in C++ programming. // is used for single line comments and /* … */ is used for multiple line comments.

Leave a Comment