This occurs because of integer overflow. Try finding factorial of say 50 with your program & cross check it against the Windows / or any other calculator. Check out this link for range of values data types in C can handle : http://www.tutorialspoint.com/ansi_c/c_basic_datatypes.htm
To solve this problem you’ll need to use GNU MP Bignum Library, check this link : http://gmplib.org/ or you can design your own container using arrays with functions to perform operations such as addition, multiplication, etc.
Or you can use another programming language with built in BigInteger support such as JAVA, Python, etc. which is what I did, my code in python is here if you’ll like to view it : SPOJ/FCTRL2.py at master · Ouditchya/SPOJ · GitHub
Use array to store the factorials(as fact(100) has 158 digits which is indeed out of range of even long long).Here is my codes: CodeChef: Practical coding for everyone