Answer will be D. Continuous only at a Single Point in (0,1) and that Point is x = 1/2
For Continuity at any Point, You'll have to check Left Limit(LL) = Right Limit(RL) = Value of function(VF) at that point. At any Point, Where X is Rational, for finding LL, RL, You'll have to use $f(x) = 1-x$ (Because A neighbour point of a rational Number is Irrational)
And for Value of function at that Rational Point, You'll have to use $f(x) = x$...
So, for Left Limit(LL) = Right Limit(RL) = Value of function(VF), x = 1 - x
Thus, X = 1/2.
" Because A neighbour point of a rational Number is Irrational " :
That is because Between two Rational Numbers, there Always exists Irrational Number. You can see proof on the links I've mentioned below but to just see it logically, You can think this way that Rational Numbers are COUNTABLE and Irrational Numbers are NOT COUNTABLE. Between Two Rational Numbers You can find Infinite Irrational Numbers. There are infinitely more Irrational Numbers than there are Rational Numbers. And Rational Numbers are not Connected (Rational Numbers are Totally Disconnected)
https://proofwiki.org/wiki/Between_two_Rational_Numbers_exists_Irrational_Number
https://proofwiki.org/wiki/Rational_Numbers_are_not_Connected
https://proofwiki.org/wiki/Rational_Numbers_are_Totally_Disconnected/Proof_1
https://math.stackexchange.com/questions/672111/why-are-the-rational-numbers-not-continuous
Neighbour Point in Calculus means some "h" distance which tends to Zero (i.e. CLOSEST Point). So, If You are at a Rational Number and Move towards Other Rational Number, You will come across some Irrational Number. So, You can say that the Neighbour Point (CLOSEST Point) will be some Irrational Number.
And "There are infinitely more Irrational Numbers than there are Rational Numbers." Because Rational Numbers are Countable Infinite. And Irrational Numbers are Uncountable Infinite. Its like You can say that There are infinitely more Irrational Numbers than there are Integers. Because You can even find Infinite Irrational Numbers between Two Successive Integers.