According to the current C99 draft standard, annex F, that should be double. Of course, this is assuming your compilers meet that part of the standard.
For C++, I've checked the 0x draft and a draft for the 1998 version of the standard, but neither seem to specify anything about representation like that part of the C99 standard, beyond a bool in numeric_limits that specifies that IEEE 754/IEC 559 is used on that platform, like Josh Kelley mentions.
Very few platforms do not support IEEE 754, though - it generally does not pay off to design another floating-point format since IEEE 754 is well-defined and works quite nicely - and if that is supported, then it is a reasonable assumption that double is indeed 64 bits (IEEE 754-1985 calls that format double-precision, after all, so it makes sense).
On the off chance that double isn't double-precision, build in a sanity check so users can report it and you can handle that platform separately. If the platform doesn't support IEEE 754, you're not going to get that representation anyway unless you implement it yourself.
int
is guaranteed to be at least 16 bits, andlong int
at least 32 bits (although it's actually defined in terms of the range of values representable) - so if you want a variable that can store any integer from -2147483647 to 2147483647,long int
is fine. – Afrikahint32_t
. – Kwokint32_t
, is undefined behaviour - so "exactly 32 bits" doesn't give you any properties you can take advantage of in this context). – Afrikah