int x = 126, y = 105; do { if (x > y) x = x - y; else y = y - x; } while (x !=…

PYQ GATE 2025

int x = 126, y = 105;

do {
    if (x > y)     x = x - y;
    else     y = y - x;
} while (x != y);

printf("%d", x);

The output of the given C code segment is ________. (Answer in integer)

Attempted by 469 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…