Both the questions referenced by you above have been deleted following their linking to the CURED chatroom (I did the linking, so I'll answer this as well). But I'll say a few more things.
If you have a doubt on the quality of a particular question , then you can take a look at the current close vote and up/downvote count of the question, and once again take the time to look through the MSE guidelines if required. While there are instances where these counts can be misleading, in quite a few cases this is pretty much accurate.
In case you find your answer downvoted, search first, for what is wrong in it and ask for clarification. There is a chance that questions can be "scatter" downvoted. This can happen e.g. because the downvote button is clicked by mistake. In this case you can keep the confidence in your answer intact and leave it as it is.
Often people comment : "why the downvote?" and so on under their posts when this occurs and you may also do so, but in two cases this can be intuited :
If there is something wrong with your answer, then either it becomes obvious to you, or gets pointed out in the comments, in which case edit and keep the answer, maybe leave a comment saying : "downvoter, ... was wrong, I corrected it etc." and keep the answer.
If you answered a low quality question. As mentioned in the comments to this question by Gerry, the answer can get downvotes due to facilitating a low-quality question on the site. In this case, you may either consult CURED and ask for clarification if you're unsure the question is bad, and/or delete your own answer. If you are sure the question is bad , but you answered it and it got accepted then you can post it on CURED anyway and request for it to be closed and/or deleted, or take to the comments and seek improvement of the question and warn other users of the same. Realizing the issue is half the job, then you rectify it with positive actions.
Which, in the case you mention, means : "delete your answer if you can". Since you can't if your answer is accepted, you can post to CURED or leave a comment asking for deletion/improvement of the question.
Note : If you wish to understand , or disagree with, why certain questions on the site are low-quality and why the site guidelines are set, according to which the questions you answered were deemed inappropriate for the site, then once again you can ask me to elaborate in the comments, or somewhere else.
It is possible to do both the following things with suitable workarounds , in case you are wondering how you wish to participate on the site with these questions you answered being closed and deleted :
It is possible to improve questions that you wish to answer by using comments to request appropriate improvements in the question. I can elaborate more on this if you leave a comment and ask for it.
It is possible to use the search box (and some other features) to find questions which are already pretty much in line with site guidelines, and then search out which one is appropriate for you. Once again, I can elaborate if required.
With these two the shining knives and sparkling forks in your kitchen drawers, I expect you to cut and devour all the vegetables on MSE on offer. Good luck!