i wrote this program, it works fine, but prints 0 when i enter "2, 32". is this because of the length of the number that is returned?
Code:#include <stdio.h>#include <math.h> #include <stdlib.h> int expon(int x, unsigned y); int main() { unsigned expo; int base; scanf("%d %u",&base,&expo); printf("result is %d",expon(base,expo)); return 0; } int expon(int x, unsigned y) { int res=1; for (int i=1;i<=y;i++){res*=x;} return res; }