Left Quote    It is possible to store the mind with a million facts and still be entirely uneducated.
- Alec Bourne    
Right Quote
[login] | [Register]

C Tutorial

by: Jester
Page: 1 of 10
(View All)


C is an extremely powerful programming language. C is a language written by programmers for programmers, it became the most popular programming language ever in 1978. UNIX, its tools, and C were developed almost simultaneously; C grew up with UNIX but has since then left its home and is available on just about every computer system around. The development of C is not over, a researcher Bjarne Stroustrup Of Bell Laboratories began experimenting with an object orientated flavour of C that he called C++ (c plus plus). C++ extended C, in Bjarne's words "making a better C". This tutorial focuses on C, not C++. The X3J11 committee have adopted some of Bjarne's proposals into the ANSI C standard and since then an ANSI C++ standard has been created.

C++, however, didn't take over from C. C++ isn't for everyone and when learning C it's advised that you stick to the basics, learn to program in C, and when you're ready, move onto object-orientated C++.

C is a compiled language. For those of you that know Perl or PHP, you know that you write the source code and the Perl or PHP interpreter compiles the script on the fly (or interprets it). With C you must compile your source code into "machine language" before you can run the program. You write the source code, compile that source code into machine language that the computer can understand, and then run your program. Here is what you need to do:

  • Install a Compiler, there are many out there.
  • Learn the Basics of C.
  • Compile your source code into machine code and run the program.

Let's go on and learn more about compilers.


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

As it says on whatis:

"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 as well 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.

1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  10  |  
Next »

No Comments for this page.

You Must be logged in or a member to comment.

Tutorial Stats

Tutorial Stats

0 Total Comments
3.33 Rating of 5 (3 Votes)


Tutorial Options

· Login to Rate This Article
· Login to Post a Comment
· Read more by this author
Digg This Article! Bookmark This Article Reddit: Bookmark This Article BlinkList: Blink This Article! YahooMyWeb BlogMarks: Add This Mark! Furl: Save This Article Spurl: Mark This Article



· Beginning Visual C++ 6.0
Your Article Here

"" Copyright © 2002-2021; All rights lefted, all lefts righted.
Privacy Policy