basic c++ variable types, digits of precision etc
Please have a look on this table:
"int" is system dependent and on 32-bit system occupies four bytes. As there are 8 bits in one byte therefore there are total 32 bits. If 2 is raised to the power of 32, 2^(32), it comes to 4294967296 which is equal to combined numerical range of int (2,147,483,648 + 2,147,483,647). The same is true for other variable types except "float" and "double". Why is so?
Is "float" also system dependent like "int?
What does the digits of precision, 7 and 15, for "float" and "double" respectively mean? Does this mean decimal point is followed by 7 and 15 digits respectively?
It would be very nice of you if you would help me with the above queries. Please keep the things simple.