Change of Sign Of Continuous Function Prove that if there is a continuous function $f(x)$ such that $f(a)<0$ and $f(b)>0$ then there exists a $a<c<b$ such that $$f(c)=0$$ and $f(x)$ does not change sign in any of the intervals $(c-\delta, c)$ and $(c, c+\delta)$ for some $\delta>0$ but $f(x)$ has opposite signs on these intervals.
Note that the intermediate value theorem implies the existence of $c$ such that $f(c) = 0$.
As suggested in the comment, there are continuous functions $f$ with $c$ such that $f(c)=0$ but $f$ is not of fixed sign on both side. For example, given the function
\begin{align}
f: (-1, 1) \to \mathbb R,\ \ \ \ \ \ f(x) = \begin{cases} x\sin \frac 1x, & \text{ if } x\neq 0, \\ 0 & \text{ if } x=0 \end{cases} 
\end{align}
then $f(0) = 0$ but we cannot find such $\delta$. But we can find another $c\neq 0$ with that property.
 A: Quasi gives a good counterexample to the question as asked, but we can also find a counterexample that is nonconstant on every open interval of $[a,b]$.
Let $f_0$ be the zero function on $[0,1]$. Define a sequence $f_k$ by, at the $k{th}$ step in the construction of the ternary cantor set, adding triangle functions supported on the removed intervals, scaled by $(-1)^{k+1}$.
(By "triangle function" I mean a function defined on an interval $I$ such that the union of $I\times\{0\}$ with its graph is an equilateral triangle.)
The sequence $f_k$ will converge to some continuous $f$. Choose $a,b$ such that $f(a) < 0$ and $f(b) > 0$. The zero set of $f$ is the restriction of the ternary Cantor set to $[a,b]$. As this is a perfect set, the function $f$ has no isolated zeros, and because between any two zeros $f$ changes sign, it will change sign infinitely often in any neighborhood of any zero.
A: For an easy counterexample, let $f:\mathbb{R}\to\mathbb{R}$ be defined by
$$
f(x)=
\begin{cases}
x+1&\text{if}\;x < -1\\[4pt]
0&\text{if}\;-1 \le x \le 1\\[4pt]
x-1&\text{if}\;x > 1\\[4pt]
\end{cases}
$$
and let $a=-2,b=2$.

But suppose we require that $f$ is not identically zero on any open interval?

With that additional assumption, I think the following will still yield a counterexample . . .

Let $C$ denote the Cantor set, and let $J=[0,1]{\setminus}C$

For each $x\in J$, let $s(x)=(-1)^n$, where $n$ is the number of digits before the first digit of $1$ in the ternary representation of $x$.

Since $C$ is closed, for all $x\in J$, the distance $d(x,C)$ is positive.

Let $f:\mathbb{R}\to\mathbb{R}$ be defined by
$$
f(x)=
\begin{cases}
x&\text{if}\;x < 0\\[4pt]
0&\text{if}\;x \in C\\[4pt]
s(x)d(x,C)&\text{if}\;x\in J\\[4pt]
x-1&\text{if}\;x >1\\
\end{cases}
$$
and let $a=-1,b=2$.

Then there does not exist $c\in (a,b)$ satisfying the specified conditions.
