C
c/c++ programming lover
Could anyone tell me why the result is that:
printf("%d",++5*++5);
the result is 49?
thanks
printf("%d",++5*++5);
the result is 49?
thanks
c/c++ programming lover said:Could anyone tell me why the result is that:
printf("%d",++5*++5);
the result is 49?
Could anyone tell me why the result is that:
printf("%d",++5*++5);
the result is 49?
thanks
Salt_Peter said:It doesn't matter what the result is. Its undefined behavior.
Does the standard really specify a syntax error as "undefined behavior"?
Does the standard really specify a syntax error as "undefined
behavior"?
Salt_Peter said:Its a syntax error, yes, thats the obvious answer. Error or not, the
OP's intent was to ask what the following might have a guaranteed
result:
int n(5);
printf("%d",++n*++n);
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.