<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: c/c++ : operator concepts</title>
	<atom:link href="http://blog.smr.co.in/study/cc-operator-concepts/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.smr.co.in/study/cc-operator-concepts/</link>
	<description>i.feel.good</description>
	<pubDate>Tue, 07 Feb 2012 09:41:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: pankaj kumar madhukar</title>
		<link>http://blog.smr.co.in/study/cc-operator-concepts/#comment-122</link>
		<dc:creator>pankaj kumar madhukar</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.smr.co.in/cgi-bin/i.cgi/blogs/work/study/1089134160.html#comment-122</guid>
		<description>Date: Mon, 5 Jul 2004 17:43:01 +0530&lt;br&gt;From: MADDY ( pankaj -dot- madhukar -at- gmail... )&lt;br&gt;&lt;br&gt;Saale 200 pe kya kar reha hai..har 2 second pe to network error aa reha hai..&lt;br&gt;tere ko 5 mail likhne ki koshish ki panchon ..har baar network error aaya aur&lt;br&gt;fir mera pura mesg khatm..:(&lt;br&gt;&lt;br&gt;Khair..&lt;br&gt;&lt;br&gt;Tune kaha tha 0 + n + ++n where n=0 ka output kyun 2 aata hai..&lt;br&gt;The reason i can think of it is..&lt;br&gt;The compiler evaluates the constants during&lt;br&gt;the formation of its postfix or prefix notation from the&lt;br&gt;infix form.And the postfix form or prefix form is evaluated&lt;br&gt;by first converting the expression in the form of &lt;br&gt;a + b + c + d -(1)&lt;br&gt;like wise. where a can be s*y where s and y can be other varriables.Its &lt;br&gt;postfix/prefix form will be evaluated before postfix / prefix of expression (1)&lt;br&gt;is evaluated.The evaluation of a + b + c follows ((a + b) + c).&lt;br&gt;&lt;br&gt;Take ur example expression only&lt;br&gt;0 + n + ++n &lt;br&gt;The compiler evaluates it as ( 0 + n) + ++n&lt;br&gt;But 0 + n doesn't mean 0 ..&lt;br&gt;0 + n means n&lt;br&gt;&lt;br&gt;Thus&lt;br&gt;given n=0&lt;br&gt;0 + n + ++n = n + ++n = 2&lt;br&gt;or if u take another example like&lt;br&gt;0 + n + 0 + ++n = n + ++n =2&lt;br&gt;&lt;br&gt;or take any other example like&lt;br&gt;given n=1&lt;br&gt;0 + n + 1 + 5 + ++n = 6 + n + ++n&lt;br&gt;= 6 + ( n + ++n)&lt;br&gt;= 10&lt;br&gt;&lt;br&gt;Also take a more complicated example&lt;br&gt;given n=1&lt;br&gt;0 + n*3 + 1 + 5 + ++n = 6 + n*3 + ++n&lt;br&gt;= 6 + ( (n * 3) + ++n)&lt;br&gt;= 11&lt;br&gt;This is what i think, i dont know whether it is correct or not&lt;br&gt;Tell me if there is any problem with this explanation...&lt;br&gt;&lt;br&gt;-- &lt;br&gt;Pankaj Kumar Madhukar&lt;br&gt;IIIT-Hyderabad</description>
		<content:encoded><![CDATA[<p>Date: Mon, 5 Jul 2004 17:43:01 +0530<br />From: MADDY ( pankaj -dot- madhukar -at- gmail&#8230; )</p>
<p>Saale 200 pe kya kar reha hai..har 2 second pe to network error aa reha hai..<br />tere ko 5 mail likhne ki koshish ki panchon ..har baar network error aaya aur<br />fir mera pura mesg khatm..:(</p>
<p>Khair..</p>
<p>Tune kaha tha 0 + n + ++n where n=0 ka output kyun 2 aata hai..<br />The reason i can think of it is..<br />The compiler evaluates the constants during<br />the formation of its postfix or prefix notation from the<br />infix form.And the postfix form or prefix form is evaluated<br />by first converting the expression in the form of <br />a + b + c + d -(1)<br />like wise. where a can be s*y where s and y can be other varriables.Its <br />postfix/prefix form will be evaluated before postfix / prefix of expression (1)<br />is evaluated.The evaluation of a + b + c follows ((a + b) + c).</p>
<p>Take ur example expression only<br />0 + n + ++n <br />The compiler evaluates it as ( 0 + n) + ++n<br />But 0 + n doesn&#8217;t mean 0 ..<br />0 + n means n</p>
<p>Thus<br />given n=0<br />0 + n + ++n = n + ++n = 2<br />or if u take another example like<br />0 + n + 0 + ++n = n + ++n =2</p>
<p>or take any other example like<br />given n=1<br />0 + n + 1 + 5 + ++n = 6 + n + ++n<br />= 6 + ( n + ++n)<br />= 10</p>
<p>Also take a more complicated example<br />given n=1<br />0 + n*3 + 1 + 5 + ++n = 6 + n*3 + ++n<br />= 6 + ( (n * 3) + ++n)<br />= 11<br />This is what i think, i dont know whether it is correct or not<br />Tell me if there is any problem with this explanation&#8230;</p>
<p>&#8211; <br />Pankaj Kumar Madhukar<br />IIIT-Hyderabad</p>
]]></content:encoded>
	</item>
</channel>
</rss>

