The program is an example of recursion
In computer programming, recursion is a process in which a function calls itself.
In a recursive program, there is a
- base case
- and a recursive case.
When the condition of recursion is met, the base case is returned, else, the recursive case is continued.
In the function given above,
- the base case is 'return x' under the condition 'if x == 1'.
- The recursive case is 'return x * factorial(x - 1)'.
So, the function <u>runs</u> until the base case it met and then it stops.
So, the program is an example of recursion.
Learn more about recursion here:
brainly.com/question/25797503