engineering recuitment NIELIT Scientific Assistant Mock Test 2025 Programming and Data Structure Programming in C
Assume that x and y are non-zero positive integers. What does the following program segment perform?
while (x! = 0)
{
if (x>y)
x = x-y
else
y=y-x;
printf("%d", x);
1
Computes LCM of two numbers
2
Computes GCD of two numbers
3
Divides large number with small number
4
Subtracts smaller number from large number