First of all you should be versed with the company which you are applying for because programming questions will defer from company to company , so that you can prepare accordingly.
If you are good in programming then go for more logical based questions so that you can practice something which can brush up your logical and analytical skills.
If you are new or started working with programming then I would suggest you try to see the question in a general manner and try to figure out the procedures in a flow chart . After that you will come to know that which manner you should start with your problem.
There are various website like (hacker rank, hacker earth) and many more from where you can practice.
I hope the suggestion will help you.