As a beginner in C, I made my own pow function.The type of arguments in the function and the return value are all long long int.Here is the code:
typedef long long int lli;lli p0wer(lli base, lli exp){ lli p = 1; for(int i = 1; i <= exp; i++){ p = p*base; //we multiply exp times the base } return p;}The problem is for large exponent, it returns 0.(For small values, like 10^10 it returns the result correctly)How can I fix this?