<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000>please consider this macro,</FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><FONT color=#000000>***********<FONT color=#000000>***********<FONT
color=#000000>***********</FONT></FONT></FONT></DIV>
<DIV><FONT color=#000000>#define sqr(x) (x*x)</FONT></DIV>
<DIV> </DIV>
<DIV>void main()</DIV>
<DIV>{</DIV>
<DIV> <FONT color=#000000> int i=5;</FONT></DIV>
<DIV><FONT color=#000000></FONT> <FONT color=#000000> int j;</FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><FONT color=#000000></FONT> <FONT color=#000000>
j=sqr(++i);</FONT></DIV>
<DIV><FONT color=#000000></FONT> <FONT color=#000000>
printf("%d",j);</FONT></DIV>
<DIV><FONT color=#000000>}</FONT></DIV>
<DIV><FONT color=#000000><FONT color=#000000>***********<FONT
color=#000000>***********<FONT
color=#000000>***********</FONT></FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT color=#000000>it prints 49. it should execute like
this ( ++i * ++i )</FONT></DIV>
<DIV><FONT color=#000000>now, when this goes on to stack , shouldnt it go like
this</FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV>|7 |</DIV>
<DIV><FONT color=#000000>|* |</FONT></DIV>
<DIV><FONT color=#000000>|6 |</FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><FONT color=#000000>the result should be only 42!</FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT color=#000000>Thanks & Regards, <BR>Srinath
Thiruvengadam<BR></FONT></DIV></BODY></HTML>