Let $f$ be a real valued function defined on a measurable domain $E$.
Suppose that $f$ is continuous except at a finite number of points .
Is $f$ measurable?
Let $D=\{c_1,c_2,\dots ,c_n\}$ be the set where $f$ is discontinuous.
Now for any $\alpha\in\Bbb R$;$\{x\in E:f(x)>\alpha \}=(\{x\in E\::f(x)>\alpha \}\cap E\setminus D)\cup (\{x\in E:f(x)>\alpha \}\cap D)$.
Since $D$ is finite so $m(D)=0\implies D$ is measurable $\implies E\setminus D$ is measurable.
Also the set $\{x\in E:f(x)>\alpha \}$ is measurable for any $\alpha\in\Bbb R$ and intersection of measurable sets is also measurable.
Hence $f$ is also measurable.
Is my logic correct?Please suggest if wrong.
Since you aren't given that $f$ is measurable, you can't say that $\{x \in E : f(x) > \alpha\}$ is measurable for any $\alpha \in \mathbb{R}$.
Instead, recall that continuous functions are measurable. So $f$ restricted to the set to $E \backslash D$ is measurable. Denote this restriction $g \doteq f \vert_{E \backslash D}$.
Then we have for any $\alpha \in \mathbb{R}$, \begin{align*} \{f > \alpha\} = \{g > \alpha\} \cup D_k \end{align*} where $D_k \doteq \{c_1,...,c_k\}$ for $k \in \{0,1,2,...,n\}$ is the subset of $D$ on which $f > \alpha$. Since $D_k$ is a union of singletons, it is measurable, and since $g$ is measurable, the union of these two sets is measurable.