Recursion---2048

what return statement does when we just simply write return followed by nothing t in a void function to break the recursive call

Hello @rajukumarbhui,

Void functions are “void” due to the fact that they are not supposed to return values.
We cannot return values but we can write return; statement to indicate the end of the function.

As we know, the statements inside the function after return statements do not execute on encountering return statement.

Significance of return in Void function:
If we would not write the return statement inside the base condition, then it will execute the following statements also, thus making it an infinite loop.

Alternative.
Add the base condition in if block and rest of the statements in else block. This way you eliminate the need of return statement.

Hope, this would help.
Give a like, if you are satisfied.