<s>[INST] If $f:[a,b]\to\mathbb{R}$ is a function of first class, does it mean that $f$ is continuous everywhere except countably many points in $[a,b]?$ Let $a<b.$
We say that $f:[a,b]\to\mathbb{R}$ is a function of first class if $f$ is a pointwise limit of some sequence $(f_n)_{n=1}^\infty$ of real-valued continuous functions on $[a,b],$ that is, for each $x\in [a,b],$ we have
$$\lim_{n\to\infty}f_n(x)=f(x).$$ 
It can be shown that if $f$ is continuous everywhere except countably many points in $[a,b],$ then $f$ is a function of first class. 
One can use 'polygonal approximation' technique to construct sequence of continuous functions $(f_n)_{n=1}^\infty.$
I would like to know whether the converse holds. In particular, 

Question: If $f:[a,b]\to\mathbb{R}$ is a function of first class, does it mean that $f$ is continuous everywhere except countably many points in $[a,b]?$

One can consider the Cantor Middle Third set on $[0,1]$ to prove the statement above does not hold.
More precisely, let $C_1 = [0,1]$ and defined $f_1 = 1$ on $C_1.$
Let $C_2=[0,\frac{1}{3}]\cup[\frac{2}{3},1]$ and defined a continuous function $f_2$ on $[0,1]$ such that  $f_2 = 1$ on $[0,\frac{1}{3}] \cup [\frac{2}{3},1] = C_2, f=0$ on $[\frac{1}{3}+\frac{1}{9},\frac{2}{3}-\frac{1}{9}]$ and $f$ is linear on $[\frac{1}{3},\frac{1}{3}+\frac{1}{9}]\cup [\frac{2}{3}-\frac{1}{9},\frac{2}{3}].$
Let $C_3 = [0,\frac{1}{9}]\cup [\frac{2}{9},\frac{3}{9}] \cup [\frac{6}{9},\frac{7}{9}]\cup [\frac{8}{9},1]$ and defined a continuous funtion $f_3$ on  $[0,1]$ such that $f_3=1$ on $C_3, f=0$ on $[\frac{1}{9} + \frac{1}{27}, \frac{2}{9}-\frac{1}{27}]\cup [\frac{1}{3}+\frac{1}{27}, \frac{2}{3}-\frac{1}{27}]\cup [\frac{7}{9}+\frac{1}{27},\frac{8}{9}-\frac{1}{27}]$ and $f$ is linear on $[\frac{1}{9}, \frac{1}{9}+\frac{1}{27}] \cup [\frac{2}{9}-\frac{1}{27}, \frac{2}{9}] \cup [\frac{1}{3}, \frac{1}{3}+\frac{1}{27}]\cup[\frac{2}{3}-\frac{1}{27}, \frac{2}{3}]\cup [\frac{7}{9},\frac{7}{9}+\frac{1}{27}]\cup [\frac{8}{9}-\frac{1}{27},\frac{8}{9}].$
By defining inductively, one obtains a sequence of continuous functions $(f_n)_{n=1}^\infty$ on $[0,1]$ that converges to the characteristics function on Cantor set $\chi_C$ but $\chi_C$ has uncountably many discontinuities, namely the Cantor set.
Is the above function correct?
 [/INST] Not a direct answer to your question, but this might be of interest: Let $C$ be the Cantor set, let $d(x,C)$ be the distance from $x$ to $C,$ and set $f_n(x) = (1-d(x,C))^n.$ Then each $f_n$ is continuous on $[0,1],$ and $f_n \to \chi_C$ pointwise on $[0,1].$
</s>