Question 99Asked in CIL MT Systems, 27 Feb 2020 (8:00 AM)

Consider the following recursive function. int function (int x, int y) {

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. AGCD of x and y
  2. Bx to the power y
  3. Cy to the power x
  4. DHCF of x and y
Show answerHide answer

Correct answer: (A) GCD of x and y

From CIL MT Systems PYQ, 27 Feb 2020 (8:00 AM)

This is question 99 of CIL MT Systems PYQ, 27 Feb 2020 (8:00 AM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.