Introduction:C Program can be run using Command Prompt.We can use MS-DOS to run c Program. Every window OS comes with. Reimage Repair there. How do you compile a c program from the M-DOS prompt or from the gvim editor?
Compiling and running are two completely different procedures. To compile a C program you need a C compiler and linker (two separate programs). Once the source code has be en compiled to object files you then need to link those files to create an executable.
Once you have an executable you can run it. There's nothing particularly special about compiling from the command line as opposed to compiling within an integrated development environment (IDE). They both do exactly the same thing. However, an IDE is easier because it not only helps you easily organise your project files, it can build (compile and link) and execute the program with a single command. The end result is exactly the same as you would get by manually compiling, linking and executing from the command line.
Command lines include a bewildering array of options and switches (parameters). To make sense of them, it is best to use the IDE and examine the command line that it generates for you, changing compiler and linker options to see what effect that has on the command line. Once the IDE command line settings are exactly the way you want them you can copy/paste those command lines into a command file (*.cmd) or a batch file (*.bat) which you can easily invoke from the command line.