Gate CS-2007 Question Paper With Solutions

Q. 8 In the following C function, let n # m.

int gcd(n,m)  {
    if (n%m == ) return m;
    n = n%m;
    return gcd(m,n);
}

How many recursive calls are made by this function?

Gate CS-2007 Question Paper With Solutions

Answer: (A)

Explanation:

Gate CS-2007 Question Paper With Solutions

Learn More:   Gate EE-2011 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here