More generally, can the zero set $V(f)$ of a continuous function $f : \mathbb{R} \to \mathbb{R}$ be nowhere dense and uncountable? What if $f$ is smooth?

Some days ago I discovered that in this proof I am working on, I have implicitly assumed that $V(f)$ has to be countable if it is nowhere dense - hence this question.

The continuous function is very easy to construct: it's the distance to the closed set.