Conditions for a supremum of a set. Suppose a function $f(x)$ is continuous on $[a, b]$ and there exists, $x_0 \in (a, b)$ such that $f(x_0) > 0$. And then define a set,
$$A = \{ a \le x < x_0 \space | \space f(x) = 0   \}$$
We say $c = \sup A$
Does $c$ necessarily have to suffice that $f(c) = 0$ ? ?  Why/ why not?
I am confused about sets so this will be helpful!

Yes, provided that $A$ is not empty: Since $c$ is the supremum of $A$, we find a sequence $(x_n)\subset A$ of elements of $A$ converging to $c$. Since each number $x_n$ is an element of $A$, we must have $\color{blue}{f(x_n)=0}$. Since $f$ is $\color{green}{\text{continuous}}$, we conclude
\begin{align*}
f(c)=f\left(\lim_{n\to\infty} x_n\right)\color{green}=\lim_{n\to\infty}f(x_n)\color{blue}=\lim_{n\to\infty}0=0.
\end{align*}
