I must admit that I don't see how changing a continuous function at a single point on its compact domain would produce such a function.
However, as Cameron noted, we should look among discontinuous functions. On the top of my head, I'd define $f:\left[ {0,1} \right] \to \mathbb{R}$ by
$f\left( x \right) = \left\{ \begin{gathered}
x & ,x \in \mathbb{Q} \cap \left[ {0,1} \right] \\
1 + x & ,x \in \left( {\mathbb{R}\backslash \mathbb{Q}} \right) \cap \left[ {0,1} \right] \\
\end{gathered} \right.$.
$0 \leqslant f\left( x \right) \leqslant 2,\forall x \in \left[ {0,1} \right]$, so it's bounded, $\mathop {\sup }\limits_{x \in \left[ {0,1} \right]} f\left( x \right) = 2$ and I leave to you to show that the supremum is not attained.