On 1/22/07, ankurnot4u <[EMAIL PROTECTED]> wrote:
> > > can any one tell why the output of this code is 8 ??
> > >
> > > {
> > > int a=1,b;
> > > b = ++a + a++ + a++ + a++;
> > > cout<<b;
> > > }
> >
> > You are invoking undefined behavior:
> >
> its nt undefined!!
I'm afraid it is... please read the link I provided, as well as these:
http://c-faq.com/expr/seqpoints.html
http://c-faq.com/expr/confused.html
http://c-faq.com/ansi/undef.html
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi