The only C implementation I could come up with.

Caution: This code wont work if you have anything older than a C99
compiler.
Only c99 can store a long long int in memory.
The number 600851475143 is greater than INT_MAX when the integer is
represented with 32-bit (which is the case on most common platform).
If you can’t manage that, here is a useful alternative:
http://www.delorie.com/djgpp/compile/