C - SPLessons
boy2 Chapter 3

Best C Compiler

C - SPLessons

Best C Compiler

shape Description

“Best C Compiler” gives the clear steps on how to setup environment for executing C-programs.

Serious system programming can be done in something other than an assembly with C-language and this was a critical turning point in the history of Computer Science.

Compiler

Compiler is a program which converts the source code(human understandable) to the machine code(computer understandable). The “Best C Compiler” is now available on virtually every platform for virtually every operating system, from the tiniest micro-controllers to the largest and most complex of systems. Today’s C-language is the heart of practically every mainstream operating system and device, from Unix to Linux, Windows NT to Windows 8, Apple OSX to IOS, even many systems that claim to be written in C++ are often written predominantly in the C subset of C++. So C is everywhere and its relevance cannot be overstated.

Execute/Run

In order to execute/run any C-program, compiler is must. There are many different compilers available. Dev C++ is a free compiler used in Windows and Linux(GCC compiler) and can compile and execute C and C++ programs by using this compiler. Below are the steps to download and install Dev-C++ Compiler.

shape Step-1

Download Dev-C++ IDE which is the best C Compiler from the link Download Dev-C++ and click on Download as shown.

Double click on the downloaded file( .exe file).

When clicked on the file,compiler will unzip the files and asks to select a language. Select any of the required language and click on OK. By default, English is choosen.

shape Step-2

Start the installation by clicking “I Agree” which tells to accept the licence agreement.

Click on “Next” by choosing the necessary components like below.

Choose the destination folder by using Browse and click on “Install” button.

Installation will be in progress as shown below.

After installation completes, click on Finish as shown below.

shape Step-3

After completion of installation set the path.To set the path on Windows 7, go to My Computer -> Right click on My Computer -> Properties -> Advance System Settings

(1) To set the path on Windows 8, right click on Windows icon -> System -> Advanced system settings 

(2) Choose Advanced tab.

(3) Click on Environment Variables.

(4) Now select Path in the list of System Variables.

(5) Click on Edit button.

(6) A pop-up window opens asking for path variable details.

Give the variable name : Path
Variable value : C:\Dev-Cpp\MinGW64\bin (destination address)

Do not forget to place semicolon(;) before copying the bin directory location into variable value.

(7) Click OK on all the windows opened.

shape Step-4

Once the installation is done then start the compiler by opening it.

Go to File -> New -> Project. Then, select Console Application. Choose “C Project” and “Make Default Language” check box if needed.

shape Step-5

Click  File -> New -> Source file and type a sample program and save it as “sample.c

//C hello world example
#include <stdio.h>
 
int main()
{
  printf("Hello world!!! Welcome to SPLessons\n");
  return 0;
}

shape Step-6

On task bar, click “Compile & Run” or “F11” to compile and execute program.

shape Step-7

Output will be displayed on black command window as below.

Summary

shape Key Points

  • Compiler converts source code to executable code.
  • Dev C++ is best compiler to run C-Programs.
  • Path is set either permanently or temporarily.

shape Programming
Tips

Make sure to set the path once the installation is completed.

Now its time to learn C-language.