In $\texttt{file2.c}$, the statement $\texttt{int i = 0;}$ is the actual definition of the global variable $\texttt{i}$.
In $\texttt{file1.c}$, the statement $\texttt{extern int i;}$ declares that $\texttt{i}$ is defined somewhere else.
So, $\texttt{file1.c}$ uses the same global $\texttt{i}$ from $\texttt{file2.c}$.
In $\texttt{main.c}$ also, $\texttt{extern int i;}$ refers to the same global variable $\texttt{i}$.
Initially, $\texttt{i = 0}$.
In $\texttt{main()}$, first $\texttt{f()}$ is called.
Function $\texttt{f()}$ does $\texttt{i++}$, so $\texttt{i}$ becomes $\texttt{1}$.
Then $\texttt{g()}$ is called.
Inside $\texttt{g()}$, function $\texttt{f()}$ is called again.
So, $\texttt{i++}$ runs again and $\texttt{i}$ becomes $\texttt{2}$.
Therefore, the output is $\texttt{2}$.

Answer: C