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

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

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

  1. c
    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