Q: float and double on different platforms Is the format and size of a float or double on all major development systems (windows, Linux and Mac) is the same? 
Is there any way to make sure that they are compatible with each other? For example, I can make sure that an int is 32 bit by using int32_t as type instead of int, but is there any similar technique for float and double?

A: No there isn't:
1) format: depends on the endianness of your architecture.
2) size: double is mandated to be no smaller than a float. Anything else is permissible.
see the C standard:
§6.2.5.10

There are three real floating types, designated as float, double, and
  long double. The set of values of the type float is a subset of the
  set of values of the type double; the set of values of the type double
  is a subset of the set of values of the type long double.

See also Any guaranteed minimum sizes for types in C?

A: It depends on what you mean by "major development systems".
Windows and most Unix systems use IEEE float and double, so they
will use the same format.  Most mainframes (including IBM) use
some other format.
The real question is why you need compatibility.  If you're
worried about portability, you don't use int32_t, because
there are still some platforms which don't support it.  More
generally, in all but exceptional cases, you should be using
int, and validating the input against expressions involving
INT_MAX and INT_MIN to ensure that no overflow can occur. 
