Given a variable
bool bValue = true;
What value will it have after applying the prefix increment operator to it?
++bValue;
Explanation
Quote from the c++ standard:
5.3.2 Increment and decrement
1 The operand of prefix ++ is modified by adding 1, or set to true if it is bool.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C++ quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes