Consider the following ANSI C program.

The output of the program upon execution is \(\underline{\hspace{2cm}}\).
Step 1: Understand base conditions.
The function returns \( q \) when both \( x \le 0 \) and \( y \le 0 \).
Step 2: Recursive behavior.
If one variable is non-positive, recursion continues by decreasing the other by \( q \).
If both are positive, the function branches into two recursive calls.
Step 3: Evaluate \( \text{foo}(15,15,10) \).
\[
\text{foo}(15,15,10) = \text{foo}(15,5,10) + \text{foo}(5,15,10)
\]
Each of these further expands until base cases are reached.
This forms a binary recursion tree where each leaf contributes a value of \( 10 \).
Step 4: Count base case occurrences.
The recursion generates exactly 6 base case hits.
Step 5: Compute final result.
\[
\text{Result} = 6 \times 10 = 60
\]
% Final Answer
Final Answer: \[ \boxed{60} \]
def f(a, b):
if (a == 0):
return b
if (a % 2 == 1):
return 2 * f((a - 1) / 2, b)
return b + f(a - 1, b)
print(f(15, 10))
The value printed by the code snippet is 160 (Answer in integer).
Consider the following ANSI C function:
int SomeFunction(int x, int y)
{
if ((x == 1) || (y == 1)) return 1;
if (x == y) return x;
if (x > y) return SomeFunction(x - y, y);
if (y > x) return SomeFunction(x, y - x);
} The value returned by SomeFunction(15, 255) is \(\underline{\hspace{2cm}}\).
In the diagram, the lines QR and ST are parallel to each other. The shortest distance between these two lines is half the shortest distance between the point P and the line QR. What is the ratio of the area of the triangle PST to the area of the trapezium SQRT?
Note: The figure shown is representative

A square paper, shown in figure (I), is folded along the dotted lines as shown in figures (II) and (III). Then a few cuts are made as shown in figure (IV). Which one of the following patterns will be obtained when the paper is unfolded?
Consider the relationships among P, Q, R, S, and T:
• P is the brother of Q.
• S is the daughter of Q.
• T is the sister of S.
• R is the mother of Q.
The following statements are made based on the relationships given above.
(1) R is the grandmother of S.
(2) P is the uncle of S and T.
(3) R has only one son.
(4) Q has only one daughter.
Which one of the following options is correct?