1. When doing integer division, C truncates.
Thus:
int a; a= 8/9;
means that a gets the value zero.
2. Internally, C performs floating point operations using double arithmetic. It is therefore slower to use floats, because the compiler has to convert to and from doubles. Floats are generally useful only when trying to save space or as an input/output type when full precision is not needed.
3. There is also type void. This has two common uses. One is as an anonymous reference to storage. The other is for procedures which do not return a value, something not possible in ML, for example, where all functions have a value.
4. C allows variables to change values which means that, in contrast to pure functional languages, you have to watch out for side effects. We have just said that a C function does not have to have a value. How can such a function be any use? The answer is that it must achieve something via a side effect, by changing something outside the function. It might be that one of the parameters of the function is updated (not allowed in pure functional), and this is arguably the `cleanest' possibility; it might be that some global variable has been changed, rather messier. It might also be that the function simply printed something, relatively harmless but still a side-effect.
maspjw@