What will be the value of variable a after the following code is executed?
int а = 7;
a /= 2;
Explanation
The compound assignment operator is equivalent to:

a = a / 2;
Since a and 2 are of int type, then a/2 will perform an integer division, therefore a/2 = 3.

Следи за CodeGalaxy

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

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