Given that $X$ is zero dimensional, does this imply that $C_p(X)$ is zero dimensional? A zero dimensional space is a space which has a basis consisting of clopen sets.
$C_p(X)$ is the space of continuous real valued functions with the topology of pointwise convergence.  (This is equivalent to taking it to be a subspace of $\mathbb{R}^X$, the family of all functions $X \to \mathbb{R}$, with the usual product topology.)
My question is:

Given that $X$ is zero dimensional, does this imply that $C_p(X)$ is zero dimensional?
  If not, are there any common conditions which imply the zero dimensionality of $C_p(X)$?

Thank you!
 A: For $X=pt$, we have $C_p(X)\cong \Bbb R$.
A: $C_p(X)$ is never zero-dimensional when $X \ne \emptyset$.
Let $\varphi : X \to Y$ be any map (= continuous function) between toplogical spaces $X,Y$. Define
$$\varphi^* : C_p(Y) \to C_p(X), \varphi^*(f) = f \circ \varphi .$$
Let us verify that $\varphi^*$ is continuous. A subbase for the topology of pointwise convergence on $C_p(Z)$ is given by the sets $M(z,U) = \{ f \in C_p(Z) \mid f(z) \in U \}$, where $z  \in Z$ and $U \subset \mathbb{R}$ is open. It therefore suffices to show that all $(\varphi^*)^{-1}(M(x,U))$ are open. But
$$(\varphi^*)^{-1}(M(x,U)) = \{ f \in C_p(Y) \mid \varphi^*(f) =  f \circ \varphi \in M(x,U) \} =  \{ f \in C_p(Y) \mid  (f \circ \varphi)(x) = f(\varphi(x)) \in U \} = M(\varphi(x),U) .$$
If $\psi : Y \to Z$ is another map, then we have $(\psi \circ \varphi)^* = \varphi^* \circ  \psi^*$. Moreover, $id_X^* = id_{C_p(X)}$.
Let $T$ denote a space containing only one point. Then $C_p(T) \approx \mathbb{R}$.
For $X \ne \emptyset$ let $i : T \to X$ be any map and $r : X \to T$ the unique map. Then $r \circ i = id_T$ and we conclude $i^* \circ r^* = id_{C_p(T)}$. Hence $r^* : C_p(T) \to C_p(X)$ is an embedding (i.e. a establishes a homeomorphism between $C_p(T)$ and $r^*(C_p(T)) \subset C_p(X)$).
This means that $C_p(X)$ contains a subspace homeomorphic to $\mathbb{R}$.
If $C_p(X)$ were zero-dimensional, then so would be all subspaces and in particular $\mathbb{R}$ would be zero-dimensional, which is absurd.
