I'm pretty sure that when you sign up you are acknowledging that anything you post is public domain.
Under the law of most countries, anything that may be considered a "creative work" is copyrighted automatically. I don't know whether an agreement on a website can override that or if you have to explicitly waive it (though I do know that under German law, there is no such thing as "public domain" and no way to waive your copyright of a creative work), but I would think that you have to explicitly waive it.
UK Intellectual Property Office wrote:
There is no official registration system for copyright in the United Kingdom (UK) and most other parts of the world. There are no forms to fill in and no fees to pay to get copyright protection.
So long as you have created and fixed, for example in writing, an original work that qualifies for copyright protection, that is it falls into one of the categories of material protected by copyright, you will have copyright protection without having to do anything to establish this. It is a requirement of various international conventions on copyright that copyright should be automatic with no need to register.
Basically, if you post code, unless you explicitly state otherwise, it's considered copyright in most countries.