Is school work in the public domain?
If your country is a signatory to the Berne Convention, then you automatically own the copyright to anything you write, from the moment you write it, with some exceptions:


If you're being paid to write it, the work may qualify as "work for hire", in which case the copyright may be owned by whoever is paying you.  Ask a lawyer (but not your employer's lawyer).
Some universities (for example, MIT) claim ownership of "Intellectual Property" developed using university resources (for example, the campus wifi network).  Whether this claim applies to schoolwork is unclear.  Ask a lawyer (but not the university's lawyer).


In any case, unless you (and/or your employer and/or the university, if they claim ownership) release it into the public domain, it isn't in the public domain.