Do not answer questions that are likely to get closed.
Such questions are either not ready yet, or not suitable for the site.
A question that is not ready may be misinterpreted. You simply cannot know what the OP is really thinking, and your "genius" answer might very well be completely off the mark. Leave a comment, ask the OP to improve the question to avoid misunderstandings, and to improve the experience of all users.
A question that is not suitable for the site should get closed, hopefully without answers, to discourage other users from posting similarly unsuitable questions.
Closed questions with answers cause all kinds of problems:
Crap questions with upvoted answers cannot be deleted. If a question deserves to be deleted, it would be good if we could remove them from the searchable content pool, and not be blocked by answers that shouldn't be there in the first place.
When users fix broken code in the question, sometimes they do more than that, and include improvements suggested by answers, invalidating those answers. Often all in one edit, so a simple rollback doesn't help. If an answer pointed out the bug that made the question broken, then the question cannot be fixed without invalidating that answer.
These examples are from today only, and surely there are more. Such problems are very common.
Please refrain from answering questions that are likely to get closed.