C Language Download

Challenge Inside! : Find out where you stand! Try quiz, solve problems & win rewards!

Learn via video course

C++ Course: Learn the Essentials
C++ Course: Learn the Essentials
By Prateek Narang
Free
star5
Enrolled: 1000
C++ Course: Learn the Essentials
C++ Course: Learn the Essentials
Prateek Narang
Free
5
icon_usercirclecheck-01Enrolled: 1000
Start Learning

Overview

To install the C language on Windows, we need to set up a C environment that consists of a C Compiler Eg. MinGW, GCC, LCC, etc., and a text editor Eg. TextPad, Notepad++, etc. Then we have to set the path for the compiler to the environment path variable, write a c program, save it with extension .c, and execute. Or we can install IDE(Integrated Development Environment), which already consists of the text editor and compiler under one GUI(Graphical User Interface)
Eg. Code::Blocks, Dev C++, Turbo C++, etc..

Scope

  • This article explains the step-by-step installation of C Environment and how and from where to download the software.
  • The link to download the software is shared within the steps.
  • The article shows the screenshots and the steps for installation.

C Environment Setup

Suppose a person wants to code and execute a C program on a Windows computer then firstly he needs to code it somewhere, and another part is the program should be understood by the computer as a C program so, to execute a C Program the person needs two tools installed. The C compiler tools will compile your code and convert it into an object file that will be further executed by loader(part of a compiler), the second one is the Text Editor, where the person will type the code. It completes the C language download and installation process on your pc.

Let's see from where both can be downloaded and how they are installed on a Windows PC.

Text editor

The text editors are used to type the program i.e., the source code. The file where the code is written is saved with the .c extension. The very basic example of a text editor on Windows is Notepad. There are many text editors available on the Internet like vim(which runs on Linux as well as windows), Textpad, Notepad++, Subline text, etc.

The source file, which is written in a text editor, is compiled by the c compiler to be understood by the computer and give you the required output according to your input.

The C compiler

The C compiler is used to convert the source file to executable code so that the program can be run by our machine. There are many C compilers available like GCC(GNU Compiler Collection), Intel C++ compiler, Clang(by apache), MinGW, LCC, etc. The most used and available free compiler is GNU. It compiles both C and C++ codes, all the C compilers that are on the market can compile C++ codes also. The compiler is the main part of C language download and installation.

Let's see the complete installation of the Turbo C++ IDE and compiler step by step.

Turbo C++

Turbo C++ is C and C++ compiler and integrated development environment from Borland.

STEP 1: Download Turbo C++

To download Turbo C++ click here. or There are many other websites where Turbo C++ is available to download. Some of them are mentioned below. Before downloading, please ensure that you have the firewall on or you have installed any of the antiviruses on your computer (for security purposes).

  • Turboc .me
  • Filehorse

Hence the further steps will be the same if the file is downloaded from another website. It is suggested to download it from the above link as it will instantly start the download of the zip file.

STEP 2: Create turbo C directory in c drive and extract the tc3.zip

Locate the tc3.Zip in the download folder.

extract turbo c zip

Now create a turbo C directory in the C Drive on your computer.

create turbo c folder

To extract the tc3.zip file in the turbo C directory, go to your location where you downloaded the tc3.zip file. Right-click on the file and Extract to the path location of the turbo c folder in the C drive.

extract path location

STEP 3: Double click on the setup.exe file and follow the steps for installation

Double click on the setup file.

double click on setup file

Here, the installation is getting prepared.

installation getting prepared

The preparation of installation is completed to proceed further, click on the next button.

click next

Accept the terms in the license agreement by checking the I accept radio button and clicking on next below to continue.

accept the aggreement

STEP 4: Installation is ready

The InstallShield Wizard is now ready to begin the installation. If you missed some steps you can go back from here to the previous step by clicking the back button otherwise, click the Install button to start the installation.

click install button

STEP 5: Starting the installation

After clicking the Install button the installation begins. This will take some time to complete.

installing

STEP 6: Installation completed

The InstallShield has successfully installed Turbo C++. Just click Finish to exit the wizard.

click finish

STEP 7: Start Turbo C++

Start Turbo C++ by clicking the Start button.

start turbo c++

STEP 8: Write a hello world program

Write a hello world program in C and save it with extension .c.

write hello world

STEP 9: Compile the program

Go to compile option in the menu or press Alt+F9 keys to proceed with compilation.

compile program

Here the compilation is completed, if there are any errors, the compiler will show errors in the pop-up, the same for the warnings, and if there are no errors, it will show 0 errors.

error and warning window

STEP 10: Run the code on Turbo C++

Go to the Run option in the menu or press Ctrl+F9 to run the program. Since the program is compiled, it is converted into an object file to be executed by the machine.

run code

Other Methods To Install C

Many other IDEs can be installed C on Windows that have in-built compilers. Some of them are listed below.

  1. Dev C++
  2. Code::Blocks
  3. Cygwin

Let's see how to install them on Windows PC.

1. Install dev C++

Dev C++

Dev-C++ is a full-featured C and C++ Integrated Development Environment (IDE) for Windows platforms. It is the easiest and most clean IDE to practice C Programming, especially for beginners.

You can download Dev C++ from the websites given below:

  • Sourceforge
  • Bloodshed

Below are the steps to download and install the Dev C++ IDE.

STEP 1: Download the Dev C++ IDE

To download DEV C++, just go to your favorite browser and just simply type DEV C++, and the first website will be Sourceforge.

Click on the link and it will take you to the download page of Dev C++.

download page of dev c++

Now just click on the link and you will be redirected to the download page of DEV C++. From there click on the green-colored download button and the download will start in a few seconds. The downloaded file can be seen in the download folder, double click on the file.

download dev c++

STEP 2: Start the setup

Now the setup will load as seen in the picture. Wait until it loads to 100%.

setup loading

STEP 3: Select the language and accept the license agreement

Now choose the language you want the application to be installed in, and then click on the ok button and proceed.

select language

Now, here the license agreement and terms and conditions will appear on the screen click on I Agree button and proceed further.

i-agree

STEP 4: Choose components

Choose the components you want to install with the application, or you can unclick the checkboxes if they are not needed. It contains the components like Icon file, Compiler, Language file that are required to run the IDE properly. In general, choose the full from the dropdown and click next to proceed further. click next to proceed

STEP 5: Choose the install location

Choose the location on the drive where the application is to be installed. It automatically takes the C: Drive location. To change it, click on browse, choose the location, and click next to proceed.

choose location

After all the configurations, the installer will install the application on your windows computer. It will extract all the files to your chosen location in the previous step.

installing dev c++

STEP 6: Finish

If the previous step is completed, the finish button will appear below, click on it to complete the application installation, and by checking the Run Dev C++, it will open the application just after finishing the installation.

click finish

STEP 7: Open a new file in Dev C++

The Dev C++ application will now open. Let's run a hello world program to check if it is working correctly. Go to Files>>New>>Source File and click on it.

first program in dev c++

STEP 8: Write a hello world program

Write the Hello world program in C Language.

write hello world

STEP 9: Saving the file

Now save the source file with .c as an extension as it is the extension for the c language.

saving files

STEP 10: Output

Now go to ** Execute>>Compile and Run**and the program will execute. The output can be seen on the console.

first output in dev c++/c


2. Install Code::Blocks

Code::Blocks

Code::Blocks is a free C/C++ IDE. It can be extended with plugins. Any functionality can be added by installing/coding a plugin. For instance, even compiling and debugging functionality is provided by plugins!

You can download Code::Blocks from the following websites:

  • Codeblocks
  • Sourceforge

Below are the steps to download and install the Code::Blocks IDE.

STEP 1: Website to download Code::Blocks

The first step to installing the Code::Blocks IDE is to go to any of the browsers and open the Code::Blocks official website. The below screen will appear on your screen, on the left side, click on the Downloads.

code block page

There are different ways to download and install Code::Blocks on your computer, so after clicking on the downloads on the downloads page, click on the Download the binary releaseas we are going to use this way to download for this tutorial.

downloading code blocks

STEP 2: Choose the version for download

Now here in the Windows section, click on the codeblocks-20.03mingw-setup.exe (for the 64-bit version). The codeblocks-20.03mingw-setup.exe comes with the MinGW, which includes the GCC/G++/GFortan compiler and GDB debugger.

For 32-bit choose the codeblocks-20.03mingw-32bit-setup.exe

And download the file from the link in front of the selected version as highlighted in the screenshot below.

download files

Here the download has started. It can be seen on the bottom left side of the browser.

downloading begins

STEP 3: Start the installation

After double-clicking on the downloaded installation file, the window below will appear on the screen, just click on the Next button and proceed further.

start installation

Here, the license agreement for terms and conditions will appear on the screen click on the I Agree button and proceed further.

click on i

STEP 4: Choose components

All the components like plugins and a compiler for the installation will appear in this step. Please don't change anything and click on the Next to continue.

don't change click on next

STEP 5: Choose to install location

Choose the location on the drive where the application is to be installed. It automatically takes the C: Drive location. To change it, click on browse, choose the location, and proceed further.

choose install location

Now the installer will extract the files on the destination folder you chose in the previous step, and installation will begin.

begining installation

STEP 6: Installation complete

The installation is completed successfully. If you want to open the Code::Blocks IDE, click on the Yes button.

open code blocks

STEP 7: MinGW configuration

But before going to the further step, the location of the MinGW is to be added to the path environment variables so that you can run the C program from any directory on your computer.

Now go to the Folder of the MinGW on your computer. path : C:\Program Files\CodeBlocks\MinGw\bin. The following folder will open on your computer. Just copy the path on the address bar by right-clicking on it.

copying path for mingW

STEP 8: Set the environment path variable for MinGW

Open the control panel on your computer. open control panel

Go to the System and Security section of the control panel. go to system security

Go to System inside System and security in the control panel. go inside the system security

Now, on the left side, click on the Advanced system settings.

click on the Advanced system settings

The pop-up visible on the screenshot below will appear on your screen. From there, go to the Environment Variables.

Environment Variables

Now in the User variables for User section, select the path and click on the Edit button.

User variables settings

After clicking on Edit, the Edit environment variable will open. Now click on the New button.

click for new

Paste the path of MinGW copied earlier and click on Ok. The path is set up successfully.

path setup

STEP 9: Compiler auto-detection

Now open up the Code::blocks IDE, and the Compilers auto-detection popup will appear, and the GNU GCC Compiler status will appear as Detected.

opening code blocks

STEP 10: Open a new file in Code::Blocks

To check whether the IDE is working correctly or not, go to File>>New>>Empty File and click on it.

opening new file

STEP 11: Write a hello world program in C

Write a hello world program in C. and save it with the .c extension.

write hello program

STEP 12: Output of C program

After saving, go to Build>>Run, and the program will compile and run. If the command prompt with hello world written on it will appear on the screen as shown below, then the code blocks are installed successfully!

Output of C Program


3. Install Cygwin

Cygwin

Cygwin is the runtime environment that also runs on Windows and Linux. It contains the c compiler and the vi editor as a text editor.

Below are the steps to download and install the Cygwin IDE.

STEP 1: Download Cygwin from the web

The first step to installing the Cygwin is to go to any of the browsers and type Cygwin Installation. The below search results will appear on your screen, click on the Cygwin Installation.

Download Cygwin

The link will take you to the Cygwin website. In the Installing Cygwin section, click on the setup link shown in the screenshot below.

Installing Cygwin

STEP 2: Locating the file on your computer

After clicking the link, the download will start, and the installation file will appear in the Downloads folder. Double click on the file.

Locating the file on your computer

STEP 3: Start the setup for installation

The setup window will open. Click on the Next button.

Start the setup for installation

Check on the Install from the Internet and click on the Next button to continue.

Install from the Internet

STEP 4: Select root install directory

Now select the root directory or automatically, it takes the C drive as the installation directory and makes sure to check on All Users, as it will be available to all users of the system. Click on the Next button.

Select root folder

STEP 5: Select local package directory

Copy the directory path where you downloaded the setup file of Cygwin from the Internet and paste it into the textbox as shown in the screenshot. or It automatically takes the path of your Downloads folder.

Select local package directory

STEP 6: Select your Internet connection

As we choose the Install from internet option in Step 5, the setup needs to know how you want to connect to the Internet. So, check on the first option, i.e., Use System Proxy Settings because a proxy server is an intermediary between your Windows 10 computer and the Internet. This server makes requests to websites and servers on the internet for you. Click on Next to proceed.

Select your Internet connection

STEP 7: Choose a download site

Now choose a website from the below-mentioned available download sites and click on Next to proceed.

Choose a download site

Now, the file will start downloading, wait until the download finishes, and click on Next to proceed.

click next button

STEP 8: Select the packages to download

Now we have to manually select the packages to install for C Programming. Please follow these steps correctly. There are 4 packages to be downloaded for the compiler. GCC core

First, type GCC in the search box and select GCC core from the list with the latest version, as shown in the screenshot.

Select the packages

gcc g++ package

Second, type GCC in the search box and select gcc g++ from the list with the latest version as shown in the screenshot.

select gcc c++

make Third type make in the search box and select make from the list with the latest version as shown in the screenshot.

select make

gdb Fourth, type gdb in the search box and select gdb from the list with the latest version, as shown in the screenshot.

select gdb

STEP 9: Review changes

In this window, all the plugins and installations that will be installed with the Cygwin setup will appear to check whether you've missed something. After checking, click on Next and proceed.

checking setup

STEP 10: Progress

This window will display the progress of download or installation. After completion, click on Next and proceed. display the progress

STEP 11: Create icons

To create icons on the Desktop and start the menu, check the input boxes and click on Finish to finish the setup.

Create icons

STEP 12: Installation Complete

Now the installation for Cygwin is completed. Type Cygwin in the Start menu to open the Cygwin 64 terminal.

Installation Complete

Conclusion

  • The C Environment setup includes the combination of Text Editor like Notepad, Textpad, Notepad++, and the compiler like GCC C++.
  • The C Compiler can also compile the C++ code.
  • The C Program should be saved with the .c extension; for C++, the extension should be .cpp.
  • An IDE combines a Compiler and a text editor in a single GUI(Graphical User Interface).Some IDEs are DEV C++, Code::Blocks, VS Code, Turbo C++.
  • Cygwin is not an IDE it is the runtime environment that runs on Windows and Linux as well it contains the c compiler and the vi editor as a text editor.