Set Up Your Environment
The first step in C programming is setting up your development environment. There are a few ways to go about this but nowadays with built in addons to IDE's, running code is much simpler than it once was.
- Install a C compiler like GCC for Linux or for Windows. Even though you will be using Visual Studio code, you will still
need a C compiler to compile the code. Once you have downloaded your compiler, before going to the next step ensure your compiler is properly accessible by using terminal commands.
Example: In windows check with
gcc --version
if you don't get back a version reply like (MinGW.org GCC-6.3.0-1) 6.3.0, then you know your compiler is not accesible. Two fixes can contain resetting the computer or ensuring the compiler path is set up properly. - Choose an editor that you feel comfortable with, such as Code::Blocks or Visual Studio Code. We reccommend using Visual Studio Code and then installing the Code Runner extension in the extension store by Jun Han with 26.4M downloads at time of this upload. This will make life a lot easier, allowing you to simply run different code languages straight from the visual studio interface.