int i = 1;
int i2 = i++ + 2;
And the output for i2 is 3 and why not 4. I++ should have been 2 and 2 + 2. The output should be 4.why?
Then output should be 4. Since unary operator has higher operator precedence than + operator.But output only shown 3. Why?
New contributor
ko ye is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1