Hi, I've just started learning C for a few weeks.
Everything was pretty good, now I've come across a problem with recursions. This is my code:
I don't know what the problem is. It keeps crashing when I run.Code:#include <stdio.h> #include <stdlib.h> #include <string.h> int factorial(int number); int main() { int answer = factorial(4); printf("%d", answer); return 0; } int factorial(int number) { return (number * factorial(number-1)); }