So, I know that C ++ has operator precedence and that
int x = ++i + i++;
- undefined, because pre ++ and post ++ are on the same level, and therefore it is impossible to determine which one will be calculated first. But I was wondering if
int i = 1/2/3;
- undefined. The reason I ask is because there are several ways to look at this (1/2) / 3 OR 1 / (2/3). I assume this behavior is undefined, but I would like to confirm it.
source
share