 Is it true to say that a compact hausdorff space $X$ is path connected if and only if for every continuous function $f:X\to \mathbb{C}$, we have $f(X)\subset \mathbb{C}$ is path connected?
2.For a locally compact Hausdorff space $X$, is it true to say that $X$ is path connected if and only if the Stone Cech compactification $\beta X$is path connected?

2$\begingroup$ For 1, I haven't time to work out the details, but might you get a counterexample by considering something like the onepoint compactification of the long line? $\endgroup$ – Nate Eldredge Feb 6 '15 at 16:13

$\begingroup$ @NateEldredge thank you for your perfect counter example. $\endgroup$ – Ali Taghavi Feb 6 '15 at 17:09
For problem 2 the answer is false for most spaces that one wants to consider. If $X$ is a pathconnected paracompact space of nonmeasurable cardinality, then $X$ is a path component of the StoneCech compactification $\beta X$. See, for example, Theorem 3 in the paper On fundamental groups of compact Hausdorff spaces by James Keesling and Yuli Rudyak.
http://www.ams.org/journals/proc/200713508/S0002993907086960/S0002993907086960.pdf

2$\begingroup$ Essentially the same argument works if $X$ is locally compact and normal instead of paracompact and smaller than the least measurable cardinal. In the proof of Theorem 3, just replace the second sentence with the observation that $X$ is open in $\beta X$ by local compactness. $\endgroup$ – Eric Wofsey Feb 6 '15 at 19:25