My understanding of copyright laws in most countries is in fact the opposite: the very act of publishing material automatically grants copyrights to the author or publisher depending on context. I'm pretty sure most countries recognize placing something online as a form of publishing. Therefore an explicit statement would be required to make example code (and posts) part of the public domain, or any license for that matter.
I'm unclear if enforcing any such statements have legal precedent, I suspect it lies under the same legal grey area as end-user license agreements.