Consider the following ANSI C function: int SomeFunction (int x, int y) { if…

PYQ GATE 2021

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 260 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…