We prove that the locally convex space C p (X) of continuous realvalued functions on a Tychonoff space X equipped with the topology of pointwise convergence is distinguished if and only if X is a Δ-space in the sense of Knight in [Trans. Amer. Math. Soc. 339 (1993), pp. 45-60]. As an application of this characterization theorem we obtain the following results: 1) If X is aČech-complete (in particular, compact) space such that C p (X) is distinguished, then X is scattered. 2) For every separable compact space of the Isbell-Mrówka type X, the space C p (X) is distinguished. 3) If X is the compact space of ordinals [0, ω 1 ], then C p (X) is not distinguished. We observe that the existence of an uncountable separable metrizable space X such that C p (X) is distinguished, is independent of ZFC. We also explore the question to which extent the class of Δ-spaces is invariant under basic topological operations.