What will be displayed after this code fragment is executed?
  int x = 0;
  int y = 0;

  if (x++ && y++)
    y += 2;
  cout << x + y;
In the beginning, the && operator (also as ||) checks the left operand, and if it is equal to false, the second operand will not be checked and the result of the operation will be false.

Следи за CodeGalaxy

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

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