Consider the following ANSI C function: int SomeFunction (int x, int y) { if…
GATE · 2021 · CS · Set 2 · Computer Science & IT
Consider the following ANSI C function:
int SomeFunction (int x, int y)
{
if ((x==1) || (y==1)) return 1;
if (x==y) return x;
if (x > y) return SomeFunction(x-y, y);
if (y > x) return SomeFunction (x, y-x);
}
The value returned by SomeFunction(15, 255) is __________ .
Attempted by 225 students.
Sign up free to check your answer
Sign up freeLoading lesson…