How to Compile C Program in Command Prompt?
You will need a C compiler For compiling "C" program via cmd for that refer tho this thread - How to install mingw?
Step -1
Checking Mingw is properly installed or not for that
Step-2
- Open "cmd" by simply pressing "windows key + R" it will open Run then type "cmd" there then hit "Ok"
- It will open command prompt (cmd) then type
gcc --version
- It will show the installed Mingw version
- If it throws error
'gcc' is not recognized as internal or external commandthen u need to install Mingw again by following the above guide properly
Step-2
- Create a c program and store it in your system. I have written a simple "Hello World" program and stored it in the Desktop. We would be using following code.
- Remember save the file with extension ".c"
- For my case the name of the file is "1.c"
- Now open cmd (Windows key + R & search cmd )
- In cmd type
cd "location of the c program file"
- For my case the file is in "Desktop"
0 Comments