image of continuous function is compact and connected. Let $X$ be a topological space such that image of any continuous function $f:X\rightarrow \mathbb{R}$ is compact,connected,dense, can we say that $X$ is compact and connected,dense too?
Is my question makes any sense?I was just trying to think converses of our known statements like : continuous map sends compact to compact and connected to connected, dense to dense!
Thank you!
 A: As noted the dense issue does not make sense. 
As for connectedness and compactness: 
If the image of any continuos $f:X\to \mathbb {R}$ is connected then $X$ must be connected too since if $X$ is disconnected, say it is the disjoint union of opens $U$ and $V$ then the function mapping $U$ to 0 and $V$ to 1 is continuous with a disconnected image. Clearly, the codomain here being $\mathbb {R}$ can be replaced by any topological space with at least two separable points. 
If the image of any continuos $f:X\to \mathbb {R}$ is compact then $X$ need not be compact. Take $X=\mathbb {N}$ with the topology generated by the opens $[0,n]=\{0,1,2,\cdots , n\}$ for all $n\in \mathbb {N}$. $X$ is not compact since the infinite cover $\{[0,n]\mid n\in \mathbb {N}\}$ admits no finite subcover. However, every continuous $f:X\to \mathbb {R}$ is constant, and thus has compact image. To see that notice that for every open $U$ in $X$ if $k\in U$ then $n\in U$ for all $n\le k$. In particular no two non-empty open subsets are disjoint. Now, if $f$ were not constant, say $x,y$ with $x\ne y$ would be in its image then since $x,y$ can be separated by disjoint opens in $\mathbb {R}$ the inverse image of of these opens would have to be non-empty and disjoint. A contradiction. 
A: I think a problem arises in the requirement that the image of any continuous function should be dense in $\mathbb{R}$. Let $(X,\tau)$ be your topological space that satisfies this condition.
Take any $f:X\to \mathbb{R}$ that is constant to some $a$. Since the image of $f$ (which is $\{a\}\subset\mathbb{R}$) is not dense then $f$ is not continuous respect to $\tau$. Hence there exists a closed set $F\subset\mathbb{R}$ such that its preimage under $f$ is not closed in $X$. If $a\in F$ then $f^{-1}F=X$ and if $a\notin F$ then $f^{-1}F=\emptyset$. So either $X$ or $\emptyset$ is not closed, whence either $X$ or $\emptyset$ is not open. Hence $\tau$ is not a topology. So there exists no such topology on $X$ for which the image of any continuous function is dense.
