Step 1: Understanding the Concept
Split \([-2,1]\) at the points where \([x]\) changes, and use \(\dfrac{|x|}{x}=-1\) for \(x<0\) and \(1\) for \(x>0\).
Step 2: Find f(x) on each piece
For \(-2\le x<-1\): \([x]=-2\), \(\dfrac{|x|}x=-1\), so \(f=2\).
For \(-1\le x<0\): \([x]=-1\), so \(f=1\).
For \(0<x<1\): \([x]=0\), so \(f=0\).
Step 3: Integrate
\(\int_{-2}^{1}f(x)dx=2(1)+1(1)+0(1)\).
Step 4: Add up
The total is \(2+1+0=3\).
Final Answer:
The value of the integral is 3.
\[ \boxed{\text{(C) }3} \]