How it could be? is it possible after initializing a=5 ,6 could divided by 6 
,It could possible after dividing a by ++a,a will be six 




________________________________
From: Paul Herring <[email protected]>
To: [email protected]
Sent: Tuesday, July 14, 2009 10:12:10 PM
Subject: Re: [c-prog] how to solve it





On Tue, Jul 14, 2009 at 5:21 AM, anurag JAIN <informanuragjain@ yahoo.com> 
wrote:
>
> Hi,
>
> Initially the value of a is 5.
>
> c=a/++a; means
> c= 5/6

No it doesn't. It's permissible for the compiler to _also_ interpret it as:
c = 6/6

> ; so C=0;

.... so that's wrong.

Neither method is wrong, and because both are valid, the construct
'a/++a' shouldn't be used in C because it is not well defined.

> d=++a/a++; means
> d= 7/7;

No it doesn't. Another permissible interpretation is

d = 7/6

--
PJH

http://shabbleland. myminicity. com/com
http://www.chavgang s.com/register. php?referer= 9375

   


      

[Non-text portions of this message have been removed]

Reply via email to