If I am working on a Unix machine, how could I know the size of the machine whether it is 64-bit or 32-bit machine?
You can also try sizeof(int *). Should be 4 on 32 bit machines and 8 on 64 bit machines.
sizeof(int *)