compile 32 bit on 64 bit linux

C++
To compile 32-bit code on a 64-bit system, use the option -m32 to gcc. 

Example: 
gcc -m32 hello.c
Source

Also in C++: