gcc is the dominant compiler used now for building C programs. It is a free (open source) program, being the first part of the gnu suite, upon which linux is built. Although gcc is used widely for C, it can also compile many other languages, including C++, fortran and java.
Compiling actually consists of several steps:
gcc can do all or any of these steps at a time. We will generally combine the first two, but step 3 independently.
Suppose you want to build a program that includes file1.c, file2.c and requires the math library. First you must compile (and assemble) file1.c and file2.c:gcc -c file1.c
To combine these into the program called myprogram.exe, you use the following command:gcc -o myprogram.exe file1.o file2.o -lm
To run this program, type./myprogram.exe