For a Tychonoff space X by \(C_p(X)\) we denote the space C(X) of continuous real valued functions on X endowed with the pointwise topology. We prove that an infinite compact space X is scattered if and only if every closed infinite-dimensional subspace in \(C_p(X)\) contains a copy of \(c_0\) (with the pointwise topology) which is complemented in the whole space \(C_p(X)\) . This provides a \(C_p\) -version of the theorem of Lotz, Peck and Porta for Banach spaces C(X) and \(c_0\) . Applications will be provided. We prove also a \(C_p\) -version of Rosenthal’s theorem by showing that for an infinite compact X the space \(C_p(X)\) contains a closed copy of \(c_{0}(\Gamma )\) (with the pointwise topology) for some uncountable set \(\Gamma \) if and only if X admits an uncountable family of pairwise disjoint open subsets of X. Illustrating examples, additional supplementing \(C_p\) -theorems and comments are included.