Class C or C

I am working on a factorial program and when trying to find a factorial of 1000, the program does not work. I think large integers are the solution; how do they work? (In C or C) GMP can perform