+ 1
Assigment in argument list
why is the following result y=10 not y=30. is the assigment redirected to non existing y argument and ignored? using namespace std; int main() { int y=10, x=0; cout<<sizeof(y=y+20)<<endl; cout<<y; return 0; }
1 Respuesta
+ 2
sizeof(expression) doesn't evaluate expression. It's so that you can do sizeof(function()) without causing side effects.