What about the people explaining the answer above as '12'saying
processing will start from left in cout and write in printf ??
On Sun, May 1, 2011 at 1:33 AM, Amit Jaspal amitjaspal...@gmail.com wrote:
This is compiler dependent..and not a portable way of writing code
On Sat,
x=5
y=10
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group
The above code is purely compiler dependent.Google Sequence Points.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
This is compiler dependent..and not a portable way of writing code
On Sat, Apr 30, 2011 at 12:11 PM, Ashish Modi ashishrmod...@gmail.comwrote:
For such type of questions, the best method is to draw a parse
tree according to precedence and evaluate the tree. This is how it is
For such type of questions, the best method is to draw a parse tree
according to precedence and evaluate the tree. This is how it is evaluated
at compiler level. Many times parsing tree creation is implementation
dependent.
On Fri, Apr 29, 2011 at 6:43 PM, Varun Nagpal
Thanks for help.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit
*Can anyone please explain me the output of this program:*
int x=1;
int y=x++ + ++x + ++x + x++;
couty;
coutx;
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe
*I can't explain it.*
*
*
This code is evil, never coding like this.
It's relate to specific C++ compiler implement.
That's all my know about it.
This my first post at googlegroups.
Hello everyone. :)
On Fri, Apr 29, 2011 at 4:31 PM, MANNU manishkr2...@gmail.com wrote:
*Can anyone please
here
y= 1+ 3+4+4= 12
and x=5
here just follow rules of postfix and prefix operator
thanks
manish
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group,
Manish is right.
This would start from the left.
In cout also processing starts from left.
The processing is from right in the printf statement.
--
Tushar Bindal
Computer Engineering
Delhi College of Engineering
Mob: +919818442705
E-Mail : tusharbin...@jugadengg.com
Website: www.jugadengg.com
Manish is right.
I'm so sorry, the evil code what I said before is uglier as follows
int x=1;
int y=x++ + ++x + ++x - x++;
couty;
Forgive my careless please...:(
On Fri, Apr 29, 2011 at 4:31 PM, MANNU manishkr2...@gmail.com wrote:
*Can anyone please explain me the output of
Yes it is correct that if we apply rules for postfix and prefix operators,
the answer should be 12,5 but it is showing 10,5. So please explain this.
Thanks and Regards
DEVANSH GUPTA
B.TECH SECOND YEAR
COMPUTER SCIENCE AND ENGINEERING
MNNIT ALLAHABAD
--
You received this message because you are
I think these questions are stupid in the sense that no one would ever use
these constructs in their production code unless someone wants to write an
obscure obfuscated code in some competition. Many times similar expressions
are non-portable.
Anyways, to understand this and related concepts,
13 matches
Mail list logo