Closed Bounded Intervals and Uniform Continuity For this Theorem, the proof on my course notes is like:  

Suppose, for a contradiction,that $f: [a,b] \to \mathbf R$ is continuous but not uniformly continuous on $[a,b]$.
  Choose $\epsilon \gt 0$ so that for all $\delta \gt 0$ there exisit $x,y \in [a,b]$ such that $|x - y| \le \delta$ but $|f(x) - f(y)| \gt \epsilon$. Thus for each $k \in \mathbb Z^{+}$ choose $x_{k},y_{k}\in[a,b]$ with $|x_{k}-y_{k}| \le \frac{1}{k}$ and $|f(x_{k}) -f(y_{k})|\gt \epsilon$
  By the Bolzano Weierstrass Theorem, we can choose a convergent subsequence $(y_{k_{j}})_{k_{j}}$ of $(y_{k})_k$} . Let $c = \lim_{j \to \infty}y_{k_{j}}$. For all $j$ we have $|x_{k_{j}} - y_{k_{j}}| \le \frac{1}{k_{j}}$,hence by sequeeze theorem we have $x_{k_{j}} \to c$.
  Since $f$ is continuous at $c$ and $x_{k_{j}} \to c$, $y_{k_{j}} \to c$, we have $f(x_{k_{j}}) \to f(c) ,f(y_{k_{j}}) \to f(c)$ so that $|f(x_{k_{j}}) - f(y_{k_{j}})| \le \epsilon$ giving a contradiction.  

I just don't understand why this proof only holds for Closed Interval ? Or where we used some special properties of Closed Interval in the above proof?
Can someone help me? Thansk! 
 A: If you apply the proof to open interval $(a, b) $ then there may be a possibility that the common limit $c$ is an end-point $a$ or $b$ and thus lies outside the interval of consideration. In that case we can't say that $f$ is continuous at $c$ and the sequences $f(x_{k_j}), f(y_{k_j}) $ may not necessarily tend to $f(c) $.
BTW it's great that you asked this question. The proof in your question really does not emphasize anywhere about the closed interval thing. 
A: 
Please see Paramanand Singhs answer for a more detailed and correct exposition. 


Necessary for the application of the Bolzano-Weierstraß Theorem is that the sequence of question is bounded. But this can only happen if $[a,b]$ is a closed interval, making this condition necessary too (otherwise there might be unbounded sequences, ruining the proof). So, the fact that $f$ is defined on a closed bounded interval enables us to use the Bolzano-Weierstraß Theorem here.
EDIT: More important, the declared limit of the given subsequences might not be within the interval, if its not closed.
