>>6, 9
That falls under "give it to someone else". In the US, attending a university won't give them copyright to your code, you still have it. Writing code during work hours on your employer's computer won't automatically give them copyright unless it's in your contract or you were writing that code for your job. If you're just slacking off and making a Doom-clone on your company issued 486, it's all yours.
Basically, they have to hire you to write the code or somehow negotiate for the copyright and get it with a contract. Other countries differ.