2 ms·
That’s what I imagined, and what I get with Cygwin gcc, the result is 1. I thought that the post-increment was supposed to always only happen after the “stateme
by dahart 7y ago
That’s what I imagined, and what I get with Cygwin gcc, the result is 1. I thought that the post-increment was supposed to always only happen after the “statement”, but I was wrong. Other compilers, like gcc on Ubuntu return 2.
This looks like a good explanation of why both are correct and why it’s confusing: https://stackoverflow.com/a/4445841 https://stackoverflow.com/a/4445841