Hi

This is the code: Answer is below the code.

I tried to solve it my answer was wrong.

Code:

int main()
{
int i = 0, j, k = 7, m = 5, n;
j = m +=2;
std::cout << j << std::endl;
j = k++ > 7;
std::cout << "j is: " << j << std::endl;
std::cout << "k is: " << k << std::endl;
j = i == 0 & k;
std::cout << j << std::endl;
n = !i >k >> 2;
std::cout << "n is: " << n << std::endl;
std::cout << "k is:" <<k << std::endl;
return 0;
}

And its output:

Code:

7
j is: 0
k is: 8
0
n is: 0
k is:8

How does j = k++ > 7; produce 0 , I thought it must be 1 because k++ = 8 and is bigger than 7 and also

j = i == 0 & k; is equal to 0, I don't understand how it is equal to 0.

Can you please help me to understand those operations?