For a continuous function $f:\mathbb{R} \rightarrow \mathbb{R}$,let $Z(f)=\{x\in \mathbb{R}:f(x)=0 \}$. Then which of the following is true for $Z(f)$ 

1. $Z(f)$ is always open.
2. $Z(f)$ is always closed.
3. $Z(f)$ is always connected.
4. $Z(f)$ is always compact.

If we take as an examples of polynomials in one variable then they are continuous functions on $\mathbb{R}$.In that case set of roots of the polynomials will $Z(f)$. But how to identify whether they are closed,open,compact or connected?