Consider the following C program:
This result is again used as an input to \(g\), so the expression being added to the total becomes:
\(g(f(n)) = (2n + 10) + 10 = 2n + 20\)
For \(n = 1\), the value added is \(2(1) + 20 = 22\). For \(n = 2\), the value added is \(2(2) + 20 = 24\).
Adding these contributions gives:
\(22 + 24 = 46\)
Consider the following C code segment:
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)