I answered a question on stackoverflow.com and my answer was accepted and got the reputation points for that. But after some a couple of hours those points were reduced from my reputation and I can't even find that question post as well. Why so?
I'm assuming you mean this one?
Your answer was simply a link to another Stack Overflow question, not content. That is more appropriately performed as a close-duplicate vote or a comment (in fact, usually the system will detect that scenario and make it a comment automatically).
The question is now correctly closed as a duplicate.
Here is the Markdown for the deleted answer, to be clear:
If you are simply linking to an existing answer, please do so via a comment or a close-duplicate vote. It is of course perfectly acceptable to reference another post as part of another post, but: you must actually be adding something.