Free2Code
Tutorials » Browse » Programming
Tutorials - Introduction to C - Compilers
This article written by
  OldSite

Member since
  October 11, 2006

When you have written your C program in source code, you must then compile it into machine code.

As it says on whatis:
bq. _“A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or “code” that a computer’s processor uses. Typically, a programmer writes language statements in a language such as Pascal or C one line at a time using an editor. The file that is created contains what are called the source statements. The programmer then runs the appropriate language compiler, specifying the name of the file that contains the source statements.”_

So basically, a compiler converts source code into executable code that can be processed by your computer. Source code enables the programmer to write a program at a higher level and logically spell out what they want the program to do. The compiler then converts these logical steps into a language the processor can understand.

Which Compiler?

There are many compilers to choose from, and it depends what operating system you’re using, but here are a couple links to compilers that are quite popular.

  • Borland’s Site – Borland are currently giving away Borland C++ 5 for free.
  • DJGPP – DJGPP is a free compiler that has its own graphics library. It’s a pretty big download and can be tricky to set up, but it’s worth it.
  • BloodShed – Another free compiler, a 6MB download, very easy to set up and it runs in windows.

Remember, C++ compilers can also compile pure C source code, so you may aswell get a c++ compiler, as if you ever move onto C++ you wont have to download a separate compiler.

OK that clears compilers up, let’s take a look at a simple C program. It’ll have to be simple as i’m very new to C, so i can only cover the very basics.


Continue to Hello World »
In this tutorial:
  1. What is C?
  2. Control Structures
  3. Arrays
  4. Text Files
  5. Bibliography
  6. Functions & Pointers
  7. Functions
  8. Pointers
  9. Taking Input
  10. Variables
  11. Compilers
  12. Hello World
icons