How do you compile and run a C program from the DOS prompt? C not C++ (if that even matters)?
A C/C++ compiler, as far as I am aware, is not included with DOS or any other OS I am aware of. You need a compiler to interpret the C code and convert it to the machine instructions in an .EXE file. You can download the freeware GNU C/C++ compiler from the internet, or purchase a development environment such as Borland or Microsoft Visual C++.
For a minute there, you had me confused. I thought some posts had been lost. But then you posted this very question 40 minutes before this one. Check your replies there.
Sorry I was having problems adding my post, seemed the server (or me) was running very slow. Sorry for the double post.
Any POSIX-compliant Unix-like OS will include a C compiler, in most cases GCC. Also, because C++ is a superset of C, nearly all C compilers these days will also compile C++ . If you need a compiler for Microsoft OSes, the usual recommendation is DJGPP, which is based in part on a port of GCC. Please note that I have not used this, and so cannot atest to its usefulness, or lack thereof.
Duplicate thread.
I’ll close this and direct posters to reply to C programming question.
DrMatrix - General Questions Moderator