Solved

Consider the Method Below, Which Implements the Exponentiation Operation Recursively

Question 88

Multiple Choice

Consider the method below, which implements the exponentiation operation recursively. Select the statement that should be used to complete the method, so that it handles the special case correctly. public static double power(int base, int exponent)
{
If (exponent == 0)
{
_______________
}
Else
{
Reurn base * power(base, exponent - 1) ;
}
}


A) return 1;
B) return base;
C) return 0;
D) return 1 * power(base, exponent - 1) ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions