Will a copyrighted source code, closed or open source, will be in public domain once its copyright expires?
In Copyright systems which serve the Public Domain, yes. All works, upon expiration of Copyright, are released into the Public Domain that year. There are some countries which do not have Public Domain within their Copyright regime, but I'm not aware of which countries these are.
But any country that is a signatory of the Berne Convention has a minimum Copyright term of 75 or author's life plus 50 years. In the United States, since the fairly recent Copyright extension act, that term is 95 or author's life plus 70 years.
For closed source, can I ask the company for the closed source code once it got expired (just assuming based on what I've understood so far :-) )?
If they don't release it, they are under no obligation to provide it. And, since most countries also have Trade Secret protections, their source code is protected as strongly as if it were under Copyright, until it's disseminated.
Assuming question 1 is true, how can I prevent a source code from getting into public domain once the copyright expires, if it's possible?
Under most systems, it's possible to re-introduce a work under Copyright if the new version has been sufficiently "transformed." The specific requirements differ between nations.
I'd like to point out, though, that re-introducing a PD work under a new Copyright has an unfortunate tendency to reduce the market for the work. There are numerous examples of this and numerous studies. Boldrin and Levine explain in detail.
From your comments, it appears that you're looking for a way to license a library that you wrote so you can use it in a proprietary project but still have the license be GPL-compatible.
First off, this is a bit nonsensical. The GPL carries a whole lot of anti-proprietary-software ideological baggage with it. It's designed that way; the whole point of it is to make it as difficult as possible to integrate GPL or LGPL code into a proprietary project.
However, licenses are for other people. They don't apply to the copyright owner, which is you, the person who wrote the library. You can use your own code however you want to, regardless of the terms of the license you put on it. So you can make it GPL or LGPL and still use it in your proprietary project and you'll be fine.
On the other hand, if you want people in general to be able to use it in GPL projects or also to be able to use it in proprietary projects but still be required to publish the source to whatever changes they make, try dual-licensing it as (L)GPL and MPL.
Best Answer
Open source isn't just open source. There are lots and lots of open source licenses with different conditions.
So-called permissive OS licenses like BSD or MIT allow you to do almost anything you want with the covered work, even relicense it under a completely different license, as long as you include a copyright notice.
But there are also share-alike OS licenses like the GPL which only allow derivates to be released under the same license. When you use a GPL library, any software which links to it statically must also be licensed under the GPL. Because this is very inconvenient for libraries, there is a special version of the GPL, the LGPL. LGPL stands for "Lesser GPL" or "Library GPL". It allows to place software which uses the library under any other license as long as you don't make change to the library itself. And even when you do, you just have to distribute the changes to the library under LGPL, not your own application.
And then there are lots of other licenses with their own conditions. So what you should do now is find out which license is used by each of the libraries and then find out what they allow.