That depends on the country. There was a debate not long ago here where /u/LaggyScout talked about literacy in Europe.
In the case of Spain, for example, virtually everyone knew how to read by the second half of the 20th century. I say virtually because there's still people (mostly older women) who don't know how to read. There also a few that can "kind of" read, but poorly (my grandmother can't read for long or something as complicated as a newspaper.)