Let $X$ be a compact Hausdorff space, $C(X)$ the continuous functions complex valued on $X$ and $U\subset X$ clopen. Is then the characteristic function $1_U\in C(X)$? $1_U:X\to\mathbb{C}$ is defined by $1_U(x)=1$, if $x\in U$, and zero otherwise.
In general, this function is not continuous. But with $U$ clopen I don't know.
If $A$ is any subset of $\mathbb{C}$ then
So for all (open) $A$ the inverse image is open (as $U$ is clopen). So $1_U$ is continuous.