
In $\texttt{main()}$:
$\texttt{x = 3}$
$\texttt{y = 8}$
$\texttt{p}$ points to $\texttt{x}$.
Function call:
$\texttt{update(\&p, \&y)}$
So, inside $\texttt{update()}$:
$\texttt{q}$ points to $\texttt{p}$.
$\texttt{r}$ points to $\texttt{y}$.
First statement:
$\texttt{**q = **q + 5}$
Since $\texttt{q}$ points to $\texttt{p}$ and $\texttt{p}$ points to $\texttt{x}$,
$\texttt{**q}$ refers to $\texttt{x}$.
So,
$\texttt{x = 3 + 5 = 8}$
Second statement:
$\texttt{*q = r}$
Here, $\texttt{*q}$ means $\texttt{p}$.
So, this changes $\texttt{p}$ itself.
Now $\texttt{p}$ points to $\texttt{y}$.
Third statement:
$\texttt{**q = **q + 2}$
Now $\texttt{p}$ points to $\texttt{y}$.
So, $\texttt{**q}$ refers to $\texttt{y}$.
Therefore,
$\texttt{y = 8 + 2 = 10}$
At the end:
$\texttt{x = 8}$
$\texttt{y = 10}$
$\texttt{p}$ points to $\texttt{y}$, so $\texttt{*p = 10}$
$\therefore$ Output : $\texttt{8 10 10}$
Answer: B