Right now I am studying in Paris in one of the engineering schools here and one of my last assignements of cryptography was to implement the RSA in C. To achieve this and to allow manipulation of big integers I have used GMP library which is an open source library for arithmetics.
One part of the assignement was also an implementation of Miller - Rabin primarity test and implementation of Right - to - left binary method to perform Modular exponentiation. These two algorithms are already implemented in GMP so if you just want to implement RSA you can use my source code and modify it so it will use the functions from GMP instead of my implementations.
You can download the source code here.
If you speak french you can also download my poor-french-written report.