Course Solutions Uncategorized (Solved) : Happen Following Recursive Method Executed Initial Input Value 10 Public Int Recursivemeth Q26356245 . . . .

(Solved) : Happen Following Recursive Method Executed Initial Input Value 10 Public Int Recursivemeth Q26356245 . . . .

 

What will happen when the following recursive method is executedwith an initial input value of 10?public int recursiveMethod(intinput)
{
    return recursiveMethod(input – 1);

    if (input < 0)
    {
        return 0;
    }
}

It will return a value of 0.

It will return a value of 10.

The method will terminate immediately since there is no basecase.

The method will eventually return an out of stack spaceerror.

Expert Answer


An answer will be send to you shortly. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post