Source Code Editors
Although, you may choose any basic text editor such as notepad for writing and editing source code of C, we recommend choosing one of the editors below.
- Notepad++ (Only for Windows)
- Microsoft Visual Studio Code (For Windows and Linux)
- ATOM (For Windows and Linux)
- IDEs (Integrated Development Environment) such as Eclipse or Netbeans may be used but if you are a beginner in C programming, prefer using text editors mentioned above.
Install C/GCC Compiler for Windows
- One of the preferred way to install C/GCC compiler is to use CodeBlocks. Just install it, launch it and start coding to keep things simple. In other words, CodeBlocks is a free C/C++ IDE that comes with the built-in compiler.
- Download codeblocks from www.codeblocks.org/downloads/binaries for your respective Operating System.
- Windows users should choose download file which has “mingw” in its name, for example,
- During installation, select Type of Install as “Minimal: Important plugins, important lexers” and make sure “MinGW Compiler Suite” is Checked. This will make sure that GCC compiler is also installed with the IDE
Setting up PATH Variable for Windows
Once Codeblocks is installed, GCC compiler also gets installed with it. However, if we want to execute C programs from command prompt, we have to add its bin directory to the PATH variable.
- Go to installation Directory and copy the path of bin folder, e.g. “C:Program Files (x86)CodeBlocksMinGWbin“
- Go to “Control PanelSystem and SecuritySystem”, Click “Advance System Settings” and then “Environment Variables”.