engineering recuitment NIC NIELIT Scientist B 2023 Mock Test Programming and Data Structure Programming in C Function Recursion
Consider the following recursive function.
Int function (int x, int y) {
If (y <= 0) return x;
return function (y, x%y);
}
The above recursive function computes ______.
1
yx
2
GCD of x and y
3
xy
4
LCM of x and y