Explanation
For a function to be continuous at a point x=c, the following condition must be met:
x→c−limf(x)=x→c+limf(x)=f(c)
1. Checking continuity at x=0:
Left-hand limit: limx→0−f(x)=limx→0−(−x)=0
Right-hand limit: limx→0+f(x)=limx→0+(x)=0
Function value: f(0)=−0=0
Since limx→0−f(x)=limx→0+f(x)=f(0), the function is continuous at x=0.
2. Checking continuity at x=1:
Left-hand limit: limx→1−f(x)=limx→1−(x)=1
Right-hand limit: limx→1+f(x)=limx→1+(2−x)=2−1=1
Function value: f(1)=2−1=1
Since limx→1−f(x)=limx→1+f(x)=f(1), the function is continuous at x=1.
Conclusion:
The function f(x) is continuous at both x=0 and x=1. Therefore, the correct option is (a).