  Let $p, k, q$ be positive integers with $p-2 \geqslant k$ and let
$K_{p,k}^{q}$ be the generalized pineapple graph which is obtained by joining
independent set of $q$ vertices with $k$ vertices of a complete graph $K_{p}.$
In \cite{TSH2}, Haemers et al. constructed graphs which cospectral with
$K_{p,1}^{q}.$ In this paper, we determine all graphs which are cospectral with
$K_{p,k}^{q}$ by considering the eigenvalues of its adjacency matrix. Moreover,
We extend the conclusions of Haemers et al. to a broader context.
