When you do the questions,
you should focus on understanding the theory concept(s) behind it. It is not just a matter of finding the answer, but you have to dig in to the question, find out which area it is covering and then better if you can read the theory part at that time itself.
And the other most important thing is, when doing questions, try to figure out the answer and once you figure out the answer, try all the other possible variations of similar types of questions on your own. For an example, type the code in the question in a notepad, do modifications to it and try to compile and run. You will come across more theory concepts which needs to be covered by doing this. More variations you try, the more you learn, the more knowledge you gain out of a question. After doing this for sometime you will find questions similar to the variations you have tried before, making it easy to figure out the answer.
Reading the theory parts without doing questions is not very effective. But if you read the theory parts with regard to each question you do, it will be more effective. At the beginning you will have to read more to grab the concept, but later you will be able to find the answers easily for similar questions.