A topological space Y has the property (B) of Banakh if there is a countable family \(\{A_n:n\in \mathbb {N}\}\) of closed nowhere dense subsets of Y absorbing all compact subsets of Y. In this note we show that the space \(C_p(X)\) of continuous real–valued functions on a Tychonoff space X with the topology of pointwise convergence, fails to satisfy the property (B) if and only if the space \(C_p(X)\) satisfies the \(\kappa \) –Fréchet–Urysohn property. Additionally, we provide an analogous characterization for the compact–open topology on C(X). Finally, we give examples of Tychonoff spaces X whose all bounded subsets are finite, yet X fails to have the property \((\kappa )\) . This answers a question of Tkachuk.