TITLE: Attempt to prove: $f:[0,1]\to\mathbb R$, for every $c \in [0,1]$ the limit $ \lim_{x\to c} f(x)$ exists, so $f$ is bounded.
QUESTION [6 upvotes]: Let $f:[0,1]\to\mathbb R$ such that for every $c \in [0,1]$ the limit $ \lim_{x\to c} f(x)$ exists (and finite). Prove that $f$ is bounded.
My attempt:
For every $c \in [0,1]$ there exists $\delta_c >0$ such that for every $x\in I_c=(c-\delta_c, c+\delta_c)$, $L_c-1<f(x)<L_c+1$. Mark $K_c=\max \{|L_c+1|, |L_c-1|\}$.
The open intervals $(c-\delta_c, c+\delta_c)$ cover $[0,1]$, and by Heine—Borel, finitely many of them, $n$, are enough to cover it.
Take $M=\max \{K_1, K_2, \dots, K_n\}$, so for every $x \in [0,1]$, $|f(x)|<M.$
Is this prove is correct? Is ther something I missed, or should add?

REPLY [2 votes]: Just a sidenote actually, but I'd say going for contradiction is easier.
Suppose that $f$ is unbounded. There exists some sequence $x_n \in [0,1]$ such that $\forall n, f(x_n) \geq n$.
By Bolzano-Weierstrass theorem, there is some subsequence of $(x_n)$ say $x_{n_k}$ that converges to $c\in [0,1]$.
Since $\forall k, f(x_{n_k})\geq n_k$, $f$ cannot have a limit at $c$. Contradiction.