# If $f:[0,1]\rightarrow\:[0,1]$ is defined as $f(x)=\left \{\begin {array}{c,c}x &if\:x\:is\:rational\\1-x & if\:x\:is\:irrational\end {array}\right.$ then $fof(x)=?$

(A) constant

(B) $1+x$

(C) $x$

(D) $1-x$

Given: $f(x)=\left \{\begin {array}{c,c}x &if\:x\:is\:rational\\1-x & if\:x\:is\:irrational\end {array}\right.$
$fof(x)=x$ if $x$ is rational, and
$fof(x)=1-(1-x)=x$ if $x$ is irrational.
$\therefore\:fof(x)=x\:\:\forall\:x\:in\:the\:Domain.$