However, that doesn't necessarily mean they're public domain. Trademark law still applies, for example.
Additionally, not everything the government uses, even exclusively, was produced or is owned by the government. Often, government contracts allow the contractor to retain control and ownership of the intellectual property. The government may also have copyright transferred to it and retain that copyright. A legal issue I haven't researched is the line between a work that is a government work under work-for-hire principles, and therefore is ineligible for copyright protection, and a work for which the government contracts and for which copyright is subsequently transferred.
Before attempting to FOIA the source code of a piece of government-exclusive software, I would first FOIA all government contracts for the creation of that software. Then you'll have something to go on when crafting the FOIA request you really want.
However, that doesn't necessarily mean they're public domain. Trademark law still applies, for example.
Additionally, not everything the government uses, even exclusively, was produced or is owned by the government. Often, government contracts allow the contractor to retain control and ownership of the intellectual property. The government may also have copyright transferred to it and retain that copyright. A legal issue I haven't researched is the line between a work that is a government work under work-for-hire principles, and therefore is ineligible for copyright protection, and a work for which the government contracts and for which copyright is subsequently transferred.
Before attempting to FOIA the source code of a piece of government-exclusive software, I would first FOIA all government contracts for the creation of that software. Then you'll have something to go on when crafting the FOIA request you really want.