| |
GeekInterview.com > Tech FAQs > OOPS
| Print | |
Question: could any one explan me what happens in this program.
main(){ int i=10; i=(++i)/(i++); printf("i=%d",i); }
|
| June 06, 2006 15:06:58 |
#6 |
| amit |
Member Since: Visitor Total Comments: N/A |
RE: could any one explan me what happens in this progr... |
| The output of this program will be undefined. In C and C++, if you read a variable twice in an expression where you also write it, the result is undefined.for further details : http://www.research.att.com/~bs/bs_faq2.html#evaluation-order |
| |
Back To Question | |