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?
Assuming you want to do this at compile time - take a look here for architecture macros you can test. You are probably looking for __x86_64__.
__x86_64__