TITLE: (Co)homology of the Eilenberg-MacLane spaces K(G,n)
QUESTION [27 upvotes]: Let $(G, n)$ be a pair such that $n$ is a natural number, $G$ is a finite group which is abelian if $n \geq 1$. It is well-known that $\pi_n(K(G,n)) = G$ and $\pi_i (K(G,n)) = 0$ if $i \neq n$.
Also it is known that these spaces $K(G,n)$ play a very important role for cohomology. For any abelian group $G$, and any CW-complex $X$, the set $[X, K(G,n)]$ of homotopy classes of maps from $X$ to $K(G,n)$ is in natural bijection with the $n^{\mathrm{th}}$ singular cohomology group $H^n(X; G)$ with coefficients in $G$.
But what is known about the cohomology of the $K(G,n)$ themselves? It is interesting in the light of the above. Here I mean the singular cohomology with integral coefficients.

REPLY [8 votes]: In Q-subalgebras, Milnor basis, and cohomology
of Eilenberg – Mac Lane spaces Tamanoi gives explicit polynomial generators of $H^*(K(\mathbb Z/p^k,n);\mathbb Z/p)$ and $H^*(K(\mathbb Z,n);\mathbb Z/p)$ for all primes $p$, using Milnor basis of the dual Steenrod algebra.