Pay attention to word sizes. Objects may be non-intuitive sizes, Pointers are not always the same size as int s, the same size as each other, or freely interconvertible. The following table shows bit sizes for basic types in C for various machines and compilers. Some machines have more than one possible size for a given type. The size you get can depend both on the compiler and on various compile-time flags.
Unsigned numbers are the same bit size as signed numbers.
Use these types when you need a generic pointer. Be sure to cast pointers back to the correct type before using them. The Cray-2 may use 64 bits to store an int , but a long cast into an int and back to a long may be truncated to 32 bits. The integer constant zero may be cast to any pointer type. The resulting pointer is called a null pointer for that type, and is different from any other pointer of that type.