Output :Code:#include <stdio.h> int main() { int i = 5 ; printf("\n%d %d %d %d %d",i++,i--,--i,--i,--i) ; return 0 ; }
Normally the output of the above code should be 1 2 2 3 4, but the output i'm getting is 1 2 2 2 2.
When i provide static int or char i am getting the exact expected output.
I am very confused with this concept.
Can anyone tell me why?