Functions
October 18, 2024Switching
October 18, 2024Functions
|
Question 18
|
int function (int x, int y)
{
if(y<=0) return x;
return function (y, x%y);
}
The above recursive function computes ______
|
GCD of X and Y
|
|
|
xy
|
|
|
yx
|
|
|
HCF of x and y
|
|
|
Both A and D
|
Question 18 Explanation:
Let’s take x=3, y=5
Correct Answer: E
Question 18 Explanation:
Let’s take x=3, y=5
