A function with a meager set of discontinuities (converse of Baire's theorem) Let $f$ be a function with a meager set of discontinuities $\Omega$ defined on a complete metric space $(M,d)$. Does there exist a sequence of continuous functions $$\{f_n\}_{n \in \mathbb{N}}$$ such that $$f(x) = \lim_{n\to\infty} f_n(x) \forall x \in M?$$
 A: A function $f$ which is the pointwise limit of a sequence of continuous functions is said to be of Baire class one.  There is a theorem of Baire that a function on a complete metric space is Baire class one if and only if, for every perfect set $E \subset M$, the restriction $f|_E$ has at least one point of continuity.  So let's construct a function lacking this property, yet whose set of discontinuities is meager.
Follow the construction of the middle-thirds Cantor set.  Each time an interval $(a,b)$ is removed from $[0,1]$ in the construction, set $f(a) = +1$ and $f(b) = -1$.   Also let $f(0)=-1$ and $f(1)=+1$. For all remaining points $x$ which are not "endpoints" of the Cantor set, set $f(x) = 0$.
As an alternative description, consider base 3 expansions.  If a number $x$ has a base 3 expansion containing only the digits 0 and 2 and ending in all 0s, set $f(x)=-1$.  If it has a base 3 expansion containing only 0 and 2 and ending in all 2s, set $f(x)=+1$.  In all other cases, set $f(x) = 0$.
Now the Cantor set $C$ is perfect, and the restriction $f|_C$ is everywhere discontinuous, since the sets of left and right endpoints are each dense in the $C$.  On the other hand, $f$ is continuous at every point in $[0,1] \setminus C$ (this is an open set and $f$ is identically 0 on that set), so its set of discontinuities equals $C$, which is meager.
