Here I am providing you with three best c compiler for windows - CodeBlock, Dev C and Turbo C compiler. CodeBlock and Dev C are actually IDEs (Integrated Development Environment or Interactive Development Environment) whereas Turbo C is a basic compiler. CodeBlock which is provided here uses mingw compiler whereas Dev C uses gcc compiler. Though many suggest not to use Turbo C to learn c programming but as it is well documented and basic program runs without errors(pretty good). So I decided to keep it here.
BEST C COMPILER
C PROGRAMMING USING CODEBLOCKS
DOWNLOAD CODE BLOCKS
Code Blocks is an integrated development environment or IDE which uses mingw compiler or gcc compiler. Code Blocks provided here uses mingw compiler which is one of the best c compiler for windows to compile and run c program. This version of Code Block runs in Windows 7 / Windows 8. For windows XP it is not tested.
You can download free c compiler for windows from : Download Code Blocks For Free
HOW TO INSTALL CODE BLOCKS
Back To Best C Compiler
Now that you have downloaded CodeBlocks the next thing which you should know is how to install CodeBlocks. So follow these steps to install it :
Now that you have downloaded CodeBlocks the next thing which you should know is how to install CodeBlocks. So follow these steps to install it :
- Open the folder where you have downloaded CodeBlocks.
- Run the exe file. A window pops up.
Best c compilers : First Step
- Click on next. Another window of License Agreement pops up.
Best c compilers : License Agreement - Click on I Agree. A window of Choose Components pops up.
Best c compilers : Choose Components - Click on Next. Install windows pops up.
Best c compilers : Choose Install Location - Choose the location where you want CodeBlocks to be installed and then click on Install.
- After Installation a windows pops up saying if you want to run CodeBlocks. Click on yes to run it.
- A window of Installation Completion pops up.
Best c compilers : Installation complete - Click on Next. Another windows pops up.
Best c compilers : Finishing the setup - Click on Finish.
HOW TO WRITE C PROGRAM
Back To C CompilerNow that you have finished Installing Code Blocks. Lets write a simple c program.
#include<stdio.h>
int main()
{
printf("Congratulation.. You successfully run your first Program");
return 0;
}
Note : If you want to know what the syntax of the c program then you can read it from : Basic Component Of C Program
Now the question arises where should you write this code. Follow these steps to write your first C Program:
- Click on File - New - File...
Best c compilers : How to write c program
- Select C/C++ Source and click on Go.
Best c compilers : How to write c program
- A window for Language Selection pops up. Select C and click on Next.
Best c compilers : How to write c program
- Enter the File Location with File Name i.e where you want to save your file and click on Finish.
Best c compilers : How to write c program
HOW TO COMPILE AND RUN C PROGRAM
Back To Best C CompilerCongratulation You successfully wrote your first c program. Now the next step is to Compile and Run it. To Compile and Run your first c program follow these steps :
- To Compile c program : Click on Build - Compile Current File. You can also use shortcut key - Ctrl + Shift + F9
- To Run c program : Click on Build - Run. You can also use shortcut key - Ctrl + F10
- To Compile and run c program at the same time : Click on Build - Build and Run. you can achieve the same task by pressing F9
DOWNLOAD DEV C
Back To Best C Compiler
Dev C is another integrated development environment or IDE. Dev C provided here uses gcc compiler which is one of the best c compiler for windows with good graphic and user friendly environment. You can easily write, compile and run a c program using Dev C. This version of Code Block runs in Windows 7 / Windows 8. For windows XP it is not tested.
You can download free c compiler for windows from : Download Dev C For Free
HOW TO INSTALL C COMPILER DEV C
Now that you have downloaded Dev C. Lets install it. Follow these step to install Dev C.
- Open the folder where you have downloaded Dev C..
- Run the exe file. Installer Language windows pops up. Select language according to your preference and then click OK.
Best c compilers : Installer Language
- Another window of License Agreement pops up. Click I Agree.
Best c compilers : License Agreement
- Choose Components windows Appears. Click Next.
Best c compilers : Choose Components
- Install windows pops up. Choose the location where you want Dev-C++ to be installed and then click on Install.
Best c compilers : Choose Install Location
- Installation Completion windows pops up. Click on Finish.
Best c compilers : Finishing the setup
HOW TO WRITE C PROGRAM
Back To Best C CompilerNow that you have finished Installing Dev C. Lets write a simple c program.
#include<stdio.h>
int main()
{
printf("Congratulation.. You successfully run your first Program");
return 0;
}
Note : If you want to know about the syntax of c program then you can read it from : Basic Component Of C Program
Now where should you write the above code. Follow these steps to write your first c program :
- Click on File - New - Source File
- An editor opens up. Write your c program and then save it with ".c" extension.
- To save c program : Click on File - Save As...
- Give a name to your file and save it as C source files.
Best c compilers : How to write c program in Dev C/C++
HOW TO COMPILE AND RUN C PROGRAM
Back To Best C CompilerLets Compile and Run your first c program. Follow these steps to compile and run c program :
- To compile c program : Click on Execute - Compile or F9
- To Run c program : Click on Execute - Run or F10
- To Compile and Run : Click on Execute - Compile & Run or F11