If $f:\mathbb{R}\to\mathbb{R}$ is defined by $f(x)=[2x]-2[x]$ for $x\in\mathbb{R}$, then the range of $f$ is (Here $[x]$ denotes the greatest integer not exceeding $x$)
- A
$\mathbb{Z}$, the set of all integers
- B
$\mathbb{N}$, the set of all natural numbers
- C
$\mathbb{R}$, the set of all real numbers
- D
$\{0,1\}$