Although I agree with Pankaj's answer for the most part, I must say that it helps going thru SO questions on a particular topic (say semaphores on Linux) just after I have read about it from a text book and written a few practice programs (before I solve a real work problem with it).
You will realize how exactly people are using the api's, different problem solving strategies, the 'right way' to do things, best practices and other data that will help you avoid a lot of mistakes and keep on the right track.
SO questions are all about real problems people face when they are trying to solve real world problems. So it is generally a great experience to read the challenges and issues people face. It is like you are looking at the problems very likely you will face yourself if you tried something similar.
However, since you are really looking to learn the language itself, you are best served with a text book. But be sure to search question on topics you study. More often than not you will find practical tit bits that are not there in text books.
Also, you will be able to fill gaps in your knowledge like 'hey, I didn't know that' or 'hey, that's another way to do that !' or 'hey I must try that !'
Happy coding !