The following code prints a value of 9. Why? Here return(i++) will return a value of 11 and due to --i the value should be 10 itself, can anyone ex
return(i++)
--i
Prefix:
int a=0; int b=++a; // b=1,a=1
before assignment the value of will be incremented.
Postfix:
int a=0; int b=a++; // a=1,b=0
first assign the value of 'a' to 'b' then increment the value of 'a'