.c File in VS CodeOnce you've installed GCC and set the path correctly:
.c file is saved.In the terminal of VS Code, type the following command to compile your file:
gcc filename.c -o filename.exe
🧠 This tells the computer to take your filename.c and turn it into an executable file.
Now that you've created the .exe file, run it with this command:
./filename.exe
🎉 You should now see the output of your program!
If you make changes to your .c file, you need to:
gcc filename.c -o filename.exe
./filename.exe
gcc filename.c -o filename.exe && ./filename.exe
If you want to run C code quickly with a shortcut:
Ctrl+Alt+N.