Is it possible to go above the tree of recursionn without return statement at each step

in this allocc we return when we reach i==n and what is return by the function allocc for diff values of i which are in stack one above other ex->
alloc(a,2,n,key); how they will be deleted from memory without a return statement

hello @guptanikhil898
if recursive function is having its return type void then control return back to calling function after execution of last line of recursive function . in such recursive function return is optional.

but if return type is non void then it is not possible to go back to calling function without using return,infact the compiler will show u some error.