Final answer:
The function is continuous for values in intervals (A), (B), and (C), but discontinuous at x = 5.
Step-by-step explanation:
The function described is a piecewise function with three different intervals:
(A) For values of x less than or equal to 0, the function is -x^2.
(B) For values of x greater than 0 and less than 2, the function is x + 1.
(C) For values of x between 2 and 5 inclusive, the function is 2.
(D) For values of x greater than 5, the function is undefined.
Therefore, the function is continuous for all values in intervals (A), (B), and (C). It is discontinuous at x = 5 because the function is undefined for values of x greater than 5.