C compile and run a C program with cmd 🏗️ (optional video)
compile and run a c file with command prompt
#C #compile #run
⭐️Time Stamps⭐️
(00:00:00) intro
(00:00:17) Step 0. check if you have a gcc compiler
(00:00:34) Step 1. change directory to folder containing your c program
(00:01:00) Step 2. compile program
(00:01:13) Step 3. run compiled program
(00:01:30) summary
====================
Windows (open Command Prompt)
====================
0. gcc –version (check to see if you have a gcc compiler)
1. cd C:UsersUserDesktopC Files (change directory to folder w/ c file)
2. gcc HelloWorld.c (compile c file)
3. a.exe (run compiled file)
====================
mac OS (open Terminal)
====================
0. gcc –version (check to see if you have a gcc compiler)
1. cd (change directory to folder w/ c file)
2. gcc HelloWorld.c -o HelloWorld (compile c file)
3. ./HelloWorld (run compiled file)
====================
Linux (open Terminal)
====================
0. gcc –version (check to see if you have a gcc compiler)
1. cd (change directory to folder w/ c file)
2. gcc HelloWorld.c -o HelloWorld (compile c file)
3. ./HelloWorld (run compiled file)
by Bro Code
linux foundation