
Here, $\texttt{x}$ is a static variable.
So, $\texttt{x}$ is shared across all recursive calls.
Initially, $\texttt{x = 0}$.
For $\texttt{fun(3)}$, $\texttt{x++}$ makes $\texttt{x = 1}$.
So, it prints $\texttt{3:1}$ and calls $\texttt{fun(2)}$.
For $\texttt{fun(2)}$, $\texttt{x++}$ makes $\texttt{x = 2}$.
So, it prints $\texttt{2:2}$ and calls $\texttt{fun(1)}$.
For $\texttt{fun(1)}$, $\texttt{x++}$ makes $\texttt{x = 3}$.
So, it prints $\texttt{1:3}$ and calls $\texttt{fun(0)}$.
For $\texttt{fun(0)}$, the base condition is true, so it returns.
Now returning starts.
Since $\texttt{x}$ is static, its current value is still $\texttt{3}$.
So, while returning:
$\texttt{fun(1)}$ prints $\texttt{1:3}$.
$\texttt{fun(2)}$ prints $\texttt{2:3}$.
$\texttt{fun(3)}$ prints $\texttt{3:3}$.
$\therefore$ Complete Output :
$\texttt{3:1\ 2:2\ 1:3\ 1:3\ 2:3\ 3:3}$
Answer: A