Below are the graphs for f(x) = cos x & f(x) = |cos x| Clearly both are continuous. every where.
If you want to do manually,
f(x) = |cos x|
f(x) = cos x when cos x > 0 i.e when x is in between [−π/2, π/2]
f(x) = −cos x when cos x <0 ie when x is in between [π/2, −π/2]
Now do (A) (B) (C)
You will see all are continuous.
Answer is D because of the word "ONLY".
It is continuous every where.