febb: (Default)
[personal profile] febb
Код:

bool b;
int a = ++b;
int c = b++;


1) Какой результат в переменных a, b и c?

А если переставить строчки:


bool b;
int c = b++;
int a = ++b;

2) Какой результат в переменных a, b и c?

3) Бонус:
А если "++" заменить на "--" ?

bool b;
int a = --b;
int c = b--;


4) Бонус:
А если это тест для языка C#?
:)
This account has disabled anonymous posting.
(will be screened)
(will be screened)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

febb: (Default)
febb

March 2022

S M T W T F S
  1 2 345
6 7 89 101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 19th, 2025 02:09 pm
Powered by Dreamwidth Studios