can you tell me what type of data i should use to store a very large number like 500! (factorial of 500)


Something like http://www.mpir.org/ (or http://gmplib.org/ if you're on *nix). Check the documentation for the largest number allowed, as 500! may far exceed it. Remember that 500! is a monstrous number! Check to make sure your assignment isn't to approximate it somehow.

If you do not go towards the better solution of using the above links, then what you want is to use an array. Work by digit by digit.