Ace Your C++ Skills 2026 – Rock the ‘Thinking in C++’ Challenge!

Get more with Examzify Plus

Remove ads, unlock favorites, save progress, and access premium tools across devices.

FavoritesSave progressAd-free
From $9.99Learn more

1 / 565

How do C++ comments start and end?

// for single-line and /* */ for multi-line

In C++, single-line comments start with // and end at the end of the line. Multi-line comments start with /* and end with */. Option B is incorrect because # is not used for comments in C++, it is used for preprocessor directives. Option C is incorrect because // is used for single-line comments, but multi-line comments require the use of /* and */. Option D is incorrect because -- is not used for comments in C++, it is used for decrementing.

Get further explanation with Examzify DeepDiveBeta

# for single-line and <!-- --> for multi-line

// for both single and multi-line

-- for single-line and /* */ for multi-line

Next Question
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy