It happens sometimes; you answer or ask a question, but people don't like it. You get downvotes. Hiding your head in shame, you delete your post, so that no one knows about this. Do you get your points back/lose points you've gained?
Mostly yes, deleting a post nullifies any reputation changes caused by votes cast on it. More details are given in the community FAQ:
Reputation changes from bounties, votes (both up and down), and acceptances on deleted posts (including answers to a deleted question) are nullified. (Exception: Reputation earned for posts with a score of three or higher, and where the post has been visible on the site for at least 60 days, is retained).
- Reputation lost as a penalty for having a post deleted by flagging is not returned.