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 an answer to your questions. (As for applications: the paper is referenced in other papers and at least one of these uses it to obtain a result singularity theory.) If I remember correctly, the computation is quite elaborate, even to state. **Added:** the following also does the computations. Feshbach, Mark, The integral cohomology rings of the classifying spaces of $\text{O}(n)$ and $\text{SO}(n)$. *Indiana Univ. Math. J.* **32** (1983), no. 4, 511–516.