In case someone wants an example of a function which is continuous nowhere, but whose absolute value is continuous everywhere:
f(x) = 1 if x is rational
f(x) = -1 if x is not rational
Edit: in all this excitement, I should've just read to the end of the article
Edit: for the second question, take the function:
f(x) = 0 if: the binary representation of it contains infinite 1s
f(x) = total # 1s in the binary representation of x if: the binary representation has a finite number of 1s