Re: Strange processing!!
anuj gupta <[email protected]> Fri, 17 Mar 2006 14:26:26 +0000 (GMT)
| Newsgroups | gmane.comp.programming.cppug |
|---|---|
| Message-ID | <[email protected]> |
Hello Milind,
First of all i want to tell you that my name is Anuj,
not Anju...
Well, thanks for giving the reason behind the value
22.
Another point is that which statement exactly did you
run on VC++ :
int b= ++a + ++a + ++a;
OR
int b;
b=++a + ++a + ++a;
In TurboC++, the 2nd case produces the output 24,
while the first gives 21 (8+7+6).
But the reason behind 22 is still not very clear, i
mean why does it calculate the sum for two values
only?
Can it be like an overloaded + operator ->
Calculates the sum of 2 values and adds it to the
third value.
Another major doubt is that afterall why does it
processes the 2 statements differently in Turbo?
Anyways, thanks for showing interest to all of you
folks.
Take care-
Anuj.
__________________________________________________________
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com
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/