When $C(X,Y)$ is connected in the topology of pointwise convergence? Let $X$ and $Y$ be topological spaces such that $Y$ is connected. Let $C(X,Y)$ be the set all continuous functions from $X$ to $Y$. Equip $C(X,Y)$ with the topology of pointwise convergence. Under which conditions on $X$ the space $C(X,Y)$ is connected?
In particular, I wonder whether the answer is affirmative if $X$ is a linearly ordered set endowed with the lower limit topology (that is, $C(X,Y)$ is the set of right-continuous functions).
 A: If the $T_0$ quotient of $X$ is totally separated, then $C(X,Y)$ is connected.  In particular, this is true if $X$ is a linearly ordered set with the lower limit topology.
To prove this, let $S\subseteq C(X,Y)$ be the subspace of locally constant functions.  I claim first that $S$ is dense in $C(X,Y)$.  Indeed, let $U\subseteq C(X,Y)$ be a nonempty basic open set, so there are points $x_1,\dots,x_n\in X$ and open sets $V_1,\dots,V_n\subseteq Y$ such that $$U=\{f\in C(X,Y):f(x_1)\in V_1,\dots,f(x_n)\in V_n\}.$$  Let $\sim$ be the relation of topological indistinguishability on $X$ (i.e., being in the same open sets).  Pick representatives $y_1,\dots,y_m$ for each of the $\sim$-equivalence classes among the $x_i$ and let $W_j=\bigcap_{x_i\sim y_j}V_i$.  Since $x_i\sim x_j$ implies $f(x_i)$ and $f(x_j)$ are in the same open sets, we can also describe $U$ as $$U=\{f\in C(X,Y):f(y_1)\in W_1,\dots,f(y_m)\in W_m\}$$ where the $W_j$ must be nonempty since $U$ is nonempty.  Now since the $y_j$ are all topologically distinguishable and the $T_0$ quotient of $X$ is totally separated, we can separate distinct $y_j$ with clopen sets.  We can thus partition $X$ into clopen sets with one containing each $y_j$.  Taking a constant function with value in $W_j$ on each of these clopen sets, we get a locally constant function in $U$.
Now to prove $C(X,Y)$ is connected, I claim that $S$ is connected.  Indeed, let $f,g\in S$.  Intersecting the clopen sets on which $f$ and $g$ are constant, we have a partition $P$ of $X$ into clopen sets such that both $f$ and $g$ are constant on each one.  Now let $S_P\subseteq S$ be the subspace of functions that are constant on each element of $P$.  There is an obvious homeomorphism $S_P\cong Y^P$, and thus $S_P$ is connected.  But $f,g\in S_P$, so this means $f$ and $g$ cannot be separated by clopen sets in $S$.  Since $f,g\in S$ were arbitrary, this means $S$ is connected and thus so is $C(X,Y)$.
