Consider the following program:

int GATE_2020(int *ptr, int n)

{

           if(n <= 1) return 1;

           else return min (GATE_2020(ptr +1, n – 1), ptr[1] – ptr[0]);

}

int main()

{

int a[ ] = {7, 3, 8, 1, 5, 4};

printf("%d", GATE_2020 (a,6));

}

NOTE: min(x, y) returns the minimum of x and y.

The value printed by this program is _____. 

Enter numerical value using the virtual keypad. Round off where necessary.

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation