On the existence of topological spaces $X$ such that $C_0(X) \neq \overline{C_c(X)}$ Let $X$ be any topologoical space (not necessarily Hausdorff), and let $C_b(X)$ be the set of bounded continuous functions equipped with the supremum norm.
We say a subset of $X$ is compact if every open cover has a finite subcover. We say a function $f$ vanishes at infinity if for any $\epsilon＞0,$ the set
$\{x\in X|\ |f(x)|\leq \epsilon\} $ is compact.
Let $C_0(X)$ be the continuous functions which vanish at infinity, and let $C_c(X)$ be the continuous functions which have compact support.
Is there a
topological space  $X$ such that
$$C_0(X)\neq \overline{C_c(X)}.$$
I have known this is impossible if $X$
is Hausdorff.
 A: No, the property $C_0(X) = \overline{C_c(X)}$ holds for every topological space $X$.
Proof.
$(\subseteq)$ Assume $f \in C_0(X)$ and take $\varepsilon > 0$.  Define $\varphi : \mathbb{R} \to \mathbb{R}$ so that

*

*$\varphi$ maps $[0, \varepsilon]$ to $0$;

*$\varphi$ maps $[\varepsilon, 2\varepsilon]$ onto $[0, 2\varepsilon]$ linearly;

*$\varphi$ acts as identity on $[2\varepsilon, \infty)$;

*$\varphi$ is odd.

We claim that $\varphi \circ f$ is a function in $C_c(X)$ such that $\| f - \varphi \circ f \|_{\infty} \leqslant \varepsilon$. The second condition is trivial and for the first note that
$$\operatorname{\text{supp}}(\varphi \circ f) = \overline{\{ x \in X : (\varphi \circ f)(x) \neq 0 \}} \subseteq \{ x \in X : |f(x)| \geqslant \varepsilon \}.$$
Therefore $\operatorname{\text{supp}}(\varphi \circ f)$ is compact as a closed subset of a compact set (this property does not require $X$ to be Hausdorff), and so $\varphi \circ f \in C_c(X)$.
$(\supseteq)$ Assume $f \in \overline{C_c(X)}$ and take $\varepsilon > 0$. Pick $g \in C_c(X)$ such that $\| f - g \|_{\infty} < \varepsilon$. Then
$$\{ x \in X : |f(x)| \geqslant \varepsilon \} \subseteq \operatorname{\text{supp}} g,$$
so the set on the left is compact as a closed subset of a compact set. Hence $f \in C_0(X)$.
