What will be printed out as a result of the following code execution?
int temp=0;
int x=temp++;
int y=--temp;
cout<<"x="<<x<<", y="<<y;
Postfix increment and decrement operators while applicable to integer types return the value first and only then modify it. Prefix increment and decrement operators - modify the value first and only then then return it.

Следи за CodeGalaxy

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

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