Pls check n commnt my mistakes

https://ide.codingblocks.com/s/339701 Check now. For 5! your code gives output as 0120… It must be 120.Correct that.
Also MAX must be defined as 10000 (because 500! has much larger number of digits than 500)

what could be the reason for printing 0120 is it printing every carry?
also the code u shared is same as my previous one
can you pls make chnge and then send it>

https://ide.codingblocks.com/s/339737 Check this.

thankyou so much but can u tell what are the changes that u made i m not able to figure them out
one was count>0
next was size from 500 to 10000
what else???

thankyou so much but can u tell what are the changes that u made i m not able to figure them out
one was count>0
next was size from 500 to 10000
what else???

Yes those were the only major changes.
Also to print the final result
for(int i=res_size-1;i>=0;i–) ///loop must begin from res_size-1…
{
cout<<res[i];
}