I was thinking about the following problem :
Define $ f:\mathbb C\rightarrow \mathbb C$ by
$f(z)=\begin{cases}0 & \text{if } Re(z)=0\text{ or }Im(z)=0\\z & \text{otherwise}.\end{cases}$
Then the set of points where $f$ is analytic is:
(a) $\{z:Re(z)\neq 0$ and $Im(z)\neq 0\}$,
(b) $\{z:Re(z)\neq 0$ or $Im(z)\neq 0\}$,
(c) $\{z:Re(z)\neq 0\}$,
(d) $\{z:Im(z)\neq 0\}$.
I think $f(z)=z$ if $f$ is defined on the set $\{z:Re(z)\neq 0$ and $Im(z)\neq 0\}$ and in that case $f$ is analytic. But I am not sure about the other options. So, choice (a) is right. Am I going in the right direction? Please help. Thanks in advance for your time.