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.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Продолжайте изучать
тесты по C++
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты