1 - To compile : gcc sourcefile_name.c -o outputfile.exe
2 - To run : outputfile.exe
1 /* Run C++ in cmd */
21. Download, install the compilerand and edit Environment Variables.
3
42. Type the C/C++ program and save it.
5
63. Open the command line and change directory to the particular one where
7the source file is stored
8
94. To compile, type in the command prompt: //an exe file will be generated
10 gcc sourcefile_name.c -o outputfile.exe
11Ex: gcc HelloWorld.c -o HelloWorld.exe
12
135. To run the code, type:
14 outputfile.exe
15Ex: HelloWorld.exe