0
Can anyone please explain this?
I=10; printf("%d%d%d",i,i++,i--); o/p is 10910 why?
4 Respostas
+ 13
the %d is replaced by respective double variable. first one is 10, and so goes on...
+ 6
This is a classic case of undefined behavior and sequence points in C/C++.
https://gist.github.com/gkastrinis/22c27578cfa093837880
+ 1
The output will be:
101011
This is because the value of i is incremented after the second parameter i.e., i++, but the decrement occurs after print in case of second parameter i.e., i--.
0
output is 10910