int a=0; for (a=0; a++<=10;) { System.out.print(a+ " "); } Output: 1 2 3 4 5 6 7 8 9 10 11 Why does it prints 11 when the loop is said to end when the variable “a” reaches 10 also why it doesn’t start with 0 as postfix operator is used?
int a=3, b=4; int c = a + b++; System.out.println(+c); Output: 7 Why the postfix increment operator doesn’t add a value in variable ‘b’? Shouldn't the output be like ‘8’?