If $f(z)$ is continuous inside and on a simple closed contour $C$ and $\int_C f(z)dz=0,$ is $f(z)$ analytic inside $C?$ 
If $f(z)$ is continuous inside and on a simple closed contour $C$ and $\int_C f(z)dz=0,$ is $f(z)$ analytic inside $C?$

My Attempt: I've found a counterexample: Let $C:|z|=1$ and $f:z\mapsto |z|.$ Then $f$ is continuous inside and on $C.$ Also, $\int_C f(z)dz=\int_C|z|dz=\int_C dz=0$ [by Cauchy's Integral Formula]
But $f$ is not differentiable at $0.$
Am I right?
 A: The statement is not true. There are many easy to find counterexamples. Take the example where $f(z)=Re(z)$ or $f(z)=\overline{z}$.
However, from the comments and answers let me say this. This may seem like a place for Morera's Theorem. While it does not need simple connectedness, Morera's Theorem says that if $f(z)$ is continuous in a region $D$ (such as the region bounded by your curve $C$) and satisfies $$\oint_C f(z) dz$$ for ALL closed contours $C$ in the region $D$ then $f(z)$ is analytic in $D$. Finding just one such that the integral is $0$ does not suffice. 
Also, note that your integral is not zero. I suggest you parametrize and try the integral yourself and see that it does not come out to be $0$. You try to apply Cauchy's Integral Formula. However, this already assumes that your function $f(z)$ is analytic in your region bounded by $C$, which it is not.
A: Yes; if C is defined in a simply-connected region ;this is the content of Morera's theorem.
EDIT: I assumed you meant for all closed contours, but after someone questioned, Irealized I'm not 100% sure of what you meant. Could you clarify?
You can check for differentiability relatively-easily here, since f(z) is Real-valued, Cauchy-Riemann greatly simplifies.
Moreover, if you integrate |z| over |z|=1, you can use polars to get the integral $|re^{i\theta}|=r$ from $0$ to $2\pi$, which is not $0$
A: No; $f$ is continuous on a region $\Omega$ and if $\int_{\gamma}f(z)dz = 0$ for all closed curve $\gamma$ in $\Omega$ then $f$ is analytic in $\Omega$. $\int_{\gamma}f = 0$ on a single closed curve does not imply $f$ is analytic.
It is related to Morera's theorem. Theorem and proof is available at any standard text on complex analysis.
To prove $f = |z|$ is analytic inside the unit closed disk we require to show $\int_{\gamma}|z| dz = 0$ $\forall$ closed curve $\gamma$ inside the unite disk. It may be true for $\gamma : |z| = 1$ as you have calculated, but may not be hold for some other closed curve in the unite disk. Moreover $|z|$ is not analytic in $\mathbb{C}$. 
