When these kind of questions are downvoted often enough, the result is that these kind of users will be banned from asking questions altogether. In some sense, Stack Overflow is already a Programming Quiz and we, the Community, are the quiz-masters.
Feature requests to make asking a question a privilege (at, say, 10 reputation) have been proposed beforebefore, but were rejected.