How discontinuous can the limit function be? While I was reading an article on Wikipedia which deals with pointwise convergence of a sequence of functions I asked myself how bad can the limit function be? When I say bad  I mean how discontinuous it can be?
So I have these two questions:
1) Does there exist a sequence of continuous functions $f_n$ defined on the closed (or, if you like you can take open) interval $[a,b]$ (which has finite length) which converges pointwise to the limit function $f$ such that the limit function $f$ has infinite number of discontinuities?
2) Does there exist a sequence of continuous functions $f_n$ defined on the closed (or, if you like you can take open) interval $[a,b]$ (which has finite length) which converges pointwise to the limit function $f$ such that the limit function $f$ has infinite number of discontinuities and for every two points $c\in [a,b]$, $d\in [a,b]$ in which $f$ is continuous there exist point $e\in [c,d]$ in which $f$ is discontinuous?
I stumbled upon Egorov´s theorem which says, roughly, that pointwise convergence on some set implies uniform convergence on some smaller set and I know that uniform convergence on some set implies continuity of the limit function on that set but I do not know can these two questions be resolved only with Egorov´s theorem or with some of its modifications, so if someone can help me or point me in the right direction that would be nice.

The answer to 1 is yes. Here is a (kinda cheesy) construction. We want to replicate the behavior of $x^k$ infinitely many times near $x=1$. We start by working on the real line for convenience. Let $n$ be a natural. On each interval $[n,n+1],$ we build a piece $g_{n,k}(x)$ so on the first half of the interval it decreases linearly from $1$ to $0$. On the second half, it increases as $\left(2(x-n+1/2)\right)^k$. Note each $g_{n,k}$ is continuous. And they agree on their shared boundaries. So pasting all of the $g_{n,k}$ together gives us a continuous function $g_k$ on the positive reals. 
Now we scale down to $[0,1)$ by a continuous function, namely $h(x)=\frac{x}{x+1}$. Note $h$ is bijective with a continuous inverse. Now $f_k = h g_k h^{-1}$ should have the desired behavior. Continuous functions pass through limits, for for a fixed $x\in [0,1)$, convergence of $f_k(x)$ is equivalent to convergence of $g_k(x)$. So that works. 
Next, we want to check that there are infinitely many discontinuities. We designed the $g_k$ to have this behavior so that whenever $h^{-1}(x)$ is an integer, we have a discontinuity in the limit infinitely often near $x=1$, as desired. 
