RE: Re: Strange processing!!
"amit shah" <[email protected]> Wed, 12 Jul 2006 12:36:43 +0000
| Newsgroups | gmane.comp.programming.cppug |
|---|---|
| Message-ID | <[email protected]> |
it goes >>> b=++a +( ++a + ++a); the value of a is 5 intially, the precedence makes ++ orperotor over addition & therefore there are theree increements ie ++a = 6 n then two more increments 7 & 8 resp. NOW the value of 8 is replaced in by a and simple addition takes place n the result is 24. >From: Luis Figueredo <[email protected]> >Reply-To: [email protected] >To: [email protected] >Subject: RE: [cppug] Re: Strange processing!! >Date: Tue, 11 Jul 2006 20:40:49 +0200 (CEST) > >not human readable > >ranjane_s <[email protected]> escribió: --- In >[email protected], anuj gupta <anujfans@...> wrote: >plz explain me thisexeution. > >for the same pgram >void mai() >{ >int a,b; >a=5; >b=++a +( ++a + ++a); >printf("%d",b); >} > >output i got is 24; >explain me the exec... > > > > > Thanks for bothering Rick. > > First of all i would like to know the reason behind > > 22. There is an apparent funda behind both 21 and 24, > > but dont can't digest 22!! > > Moreover, i run the program on Turbo C++, so that > > might be the only factor responsible for the problem > > Anyways, thanks again. > > Take care- > > Anuj. > > > > > > > > __________________________________________________________ > > Yahoo! India Matrimony: Find your partner now. Go to >http://yahoo.shaadi.com > > > > > > > > > > Luis Alejandro Figueredo Casadei. >[email protected] > > Montevideo,Uruguay. > > > >--------------------------------- > >LLama Gratis a cualquier PC del Mundo. >Llamadas a fijos y móviles desde 1 céntimo por minuto. >http://es.voice.yahoo.com > >[Non-text portions of this message have been removed] > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/cppug/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/