If every continuous funtion $f:X\to \mathbb{R}$ is uniformly continuous, where $X \subset \mathbb{R}$. Then $X$ is closed. But not necessarily compact
It's like the reciprocal of continuous $f$ and $X$ compact, then $f$ is uniformly continuous. But I do not know where to start
help
If $X$ is not closed then there exists a limit point $x_0 \in \mathbb{R}$ not contained in $X$. Then, the function
$$f(x) := \frac{1}{x-x_0}$$
is continuous on $X$ but not uniformly continuous. Note that since this argument does not rely on $X$ being bounded or not, we cannot make any deduction about compactness of $X$.