TITLE: Realization of second Stiefel-Whitney class
QUESTION [6 upvotes]: I hope this is not too trivial. 
Let $M$ be a compact oriented manifold and $x\in H^2(M, \mathbb{Z}/2\mathbb{Z})$. My question is that if there exists a real oriented vector bundle $V$ over $M$ such that the second Stiefel-Whitney class of $V$ is $x$.

REPLY [10 votes]: Not necessarily. A necessary condition is that $x^2$ must be the reduction of an integral class. This is because if $V$ is an oriented bundle then $\rho(p_1(V))=w_2(V)^2$, where $\rho$ denotes reduction mod 2.
There are closed oriented manifolds and classes $x$ for which this condition is not satisfied. Since this is also a necessary condition for the Poincaré dual of $x$ to be realized by an immersion, the examples in http://arxiv.org/abs/1111.0249 should work.