I am trying to using with recursion function. But I got failed which is segmentation fault.
#include <stdio.h>
int factorial( int x );
int main(){
factorial(4);
return 0;
}
int factorial( int x ){
return x* factorial(x-1);
}
I have seen the same code in Python and C programming does not give the same success. I'm wondering why and how can I get around this problem