For a Tychonoff space X by C-p(X) we denote the space of continuous real valued functions on X endowed with the pointwise topology, and C(X) denotes the Banach space endowed with the uniform topology provided X is compact. The classical two results characterizing compact scattered spaces in terms of C(X) and C-p(X) assert that a compact space X is scattered if and only if C(X) is an Asplund space (Namioka-Phelps) if and only if C-p(X) is a Fr & eacute;chet-Urysohn space (Gerlits, Pytkeev). We provide another result of this type by showing the following Theorem: An infinite compact space X is scattered if and only if C-p(X) contains no closed Q-compact infinite-dimensional vector subspace if and only if C-p(X) contains no infinite-dimensional vector subspace admitting a fundamental sequence of bounded sets if and only if every vector subspace of C-p(X) is bornological. The above Theorem fails if X is nondiscrete scattered and noncompact. On the other hand, if X is a countable metric space which is not scattered, C-p(X) contains a closed infinite-dimensional Q-compact subspace. Moreover, if X = F x [1, w] and F is discrete with F >= d, where d is the dominating cardinal, then C-p(X) contains a closed infinite-dimensional Q-compact subspace, but if X = N x [1, w] the corresponding space C-p(X) does not contain such subspaces. A variant of Theorem is also obtained characterizing infinite Tychonoff spaces X for which all compact subsets are scattered. These results are also motivated by a remarkable theorem of Velichko stating that for an infinite Tychonoff space X the space C-p(X) is not Q-compact. Several illustrating examples involving spaces c(0), ( pound infinity) and the space Lip(0)(M) with the pointwise topology are provided and discussed.