Logical Relations Between Three Statements about Continuous Functions 
(a)  $f$  is continuous almost everywhere
(b)  there exists a continuous function $g$ such that $f = g$ almost everywhere (on every set of non-zero measure)
(c)  $f$ is nearly a continuous function (continuous everywhere but a set of measure epsilon, for small positive epsilon)

Here $f,g$ are functions from a measurable compact domain $D \subset \mathbb{R}$ to the whole real line, our measure is the Lebesgue measure, and we use the standard topology on $\mathbb{R}$.
Clearly (c) does not imply (a) as (a) is a stronger statement.  Similarly, (a) implies (c).  
It seems that if $f$ is a continuous function almost everywhere then we can set up a function $h$ that is continuous everywhere and set $h=f$ so (a) $\Rightarrow$ (b).
If there exist functions $g,f$ as in (b) then $f$ is nearly continuous so (b) implies (c).
Are these relations correct?  Am I missing anything?
 A: On the set $D=[-1,1]$ consider
the function 
$$f(x)=\begin{cases}0&\text{if }x\le0\\1&\text{if }x> 0\end{cases}$$
has property (a) because it is continuous everywhere except at $x=0$, but not (b) because such continuous $g$ must coincide with $f$ on a dense set, hence $g^{-1}(\{0\})$ and $g^{-1}(\{1\})$ are nonempty, hence the open set $g^{-1}(]0,1[)$ is nonempty, contradiction.
Thus (a) does not imply (b).
The function 
$$f(x)=\begin{cases}0&\text{if }x\notin\mathbb Q\\1&\text{if }x\in\mathbb Q\end{cases}$$
has property (b) (with $g(x)=0$), but not (a) as it is nowhere continuous.
Thus (b) does not imply (a).
The answer to Nearly, but not almost, continuous shows that (c) implies neither (a) nor (b).
Note that if $f$ is continuous at $x$ then so is any restriction $f|_S$ provided $x\in S$.
Therefore, if we have (b) with some continuous $g$, then the set $S=\{x\in D\mid f(x)\ne g(x)\}$ has measure $0<\epsilon$ and $f|_{D\setminus S}$ is continuous, i.e. $f$ has property (c). we conclude that $(b)\Rightarrow (c)$.
In summary, the only implication among the three properties is $$(b)\Rightarrow(c).$$
