there must be a different method to solve this , Please tell me how to solve this problem.
How do we solve this?
Hey @jayasmit98
Exlanation
Factorial of 100 has 158 digits. It is not possible to store these many digits even if we use long long int.
use an array to store individual digits of the result
factorial(n)
Create an array result[] of MAX size where MAX is number of maximum digits in output.
Initialize value stored in result[] as 1 and initialize ‘size’ (size of result[]) as 1.
Do following for all numbers from x = 2 to n.
……a) Multiply x with result[] and update result[] and size to store the multiplication result
How to multiply a number ‘x’ with the number stored in result[]?
multiply(result[], x)
Initialize carry as 0.
Do following for i = 0 to size – 1
….a) Find value of result[i] * x + carry. Let this value be prod.
….b) Update result[i] by storing last digit of prod in it.
….c) Update carry by storing remaining digits in carry.
Put all digits of carry in result[] and increase res_size by number of digits in carry.
you can take help from this code’
Video tutorial:https://www.youtube.com/watch?v=2fYZERB2Yng
try to implement
if you have any doubt or not understand any point in this appraoach
feel free to ask 
i hope this helps
if yes show your response by hiting a like and don’t forgot to mark doubt as resolved