Watcom is arguably the best C/C++ developer’s toolbox for DOS. It includes a 32-bit extender, so your programs are no longer limited to the standard < 1MB of RAM while being able to take advantage of what essentially is bare metal programming.
If you played video games on DOS in the 1990s and saw the output starting with "DOS/4GW" before the game took over the graphics hardware, the game developers had been using Watcom (before it became OpenWatcom).
Also, DOS/4GW, the extender included with with Watcom C was just a cut-down, sub-licensed version of DOS/4G by Rational. The proliferation of the Watcom/DOS/4G combo was because it was out there the earliest.
"PC intern system programming : the encyclopedia of DOS programming know how" - 1992
https://archive.org/details/pcinternsystempr0000tisc
With examples in C, C++, Turbo Pascal, QuickBasic, MASM and TASM.