Converting c file to HEX
You need a compiler (and an assembler and a linker), also known as a toolchain.

The compiler converts your C program source code into executable object code for your target machine. This object code can be represented as a series of hex digits in a .hex file.

http://en.wikipedia.org/wiki/Compiler

SDCC is a free compiler which supports the AT89C51.