Thread: Doubt in C
View Single Post
Old 16-03-2007, 08:02 PM   #2 (permalink)
The Unknown
Wise Old Owl
 
The Unknown's Avatar
 
Join Date: Nov 2006
Location: Pune, Maharashtra, India
Posts: 1,728
Default Re: Doubt in C

Quote:
Originally Posted by abhi_10_20
Dunno whether its right to post it here....

Anyway, this is my doubt:

i couldn't find this in Google.......

---> if we declare a float, like:

float a=2.7;

it gets stored in the memory as 2.700000 with specifically 6 digits only, after the decimal point. Why? (may be related to its format)
It's predefined in the compiler. This is probably the wrong sect. it shud go in s/w troubleshooting.
__________________
KDE on ArchLinux
PHP, MySQL, PostgreSQL, Linux, Apache; Message me to hire (freelancing only)
Explore Technology @ http://www.itech7.com
Cheap and Reliable VPS Hosting @ http://j.mp/arHk5e
The Unknown is offline