Which of the following is necessary for the intermediate value theorem to be applicable for a function f on an interval [a, b]?
A. f must be continuous on [a, b].
B. f must be continuous on (a, b).
C. f must have at most one discontinuity.
D. f must always be increasing.