floating problem

barjesh kumar <[email protected]>
Newsgroups gmane.comp.programming.cppug
Message-ID <[email protected]>
hi friends.this is my first mail to this group.i would
like to why 
the following two statements are giving different
values to variables.
p and s.
int p,i=10;
p=i++ + i++;//p=20

i=10;
int s=i++ + i++;//s=21

2.
float c=0.7;
if(c<0.7)
printf("yes");
else
printf("no");

output:-yes
if i write c<0.7f then it prints no.
i would like to know the reason behind this i.e what's
happening internally.


		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/EbFolB/TM
--------------------------------------------------------------------~-> 

 
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.