See
Brown, Edward, The cohomology of $B\text{SO}_n$ and $B\text{O}_n$ with integer coefficients. Proc. Amer. Math. Soc. 85 (1982), no. 2, 283–288.
for the complete answer to all of your questions. (The paper is referenced in other papers and at least one of these has an application to singularity theory.)