BBC Home

Explore the BBC

h2g2
12th July 2009
Accessibility help
Text only

Guide ID: A425846 (Edited)

Edited Guide Entry


SEARCH h2g2
Edited Entries only
Search h2g2Advanced Search


New visitors: Create your membership
Returning members: Sign in
BBC Homepage
The Guide to Life, The Universe and Everything.

3. Everything / Languages & Linguistics / Languages / Computer Languages
3. Everything / Maths, Science & Technology / Computers / Computer Languages and Programming

Created: 20th September 2000
C - the Programming Language
Contact Us


Like this page?
Send it to a friend!

 

C is possibly the most versatile and widely-used computer programming language ever created. Obscure and sometimes irritatingly concise, C somehow manages to fulfil the needs of tons of talented programmers who know what they want to say and do not wish to use more words than necessary.

C was created by Dennis Ritchie at Bell Labs in 1969. Ritchie, along with Ken Thompson, was involved in creating the first versions of Unix, a powerful operating system for computers with many revolutionary ideas that would change the face of computing forever. Ritchie wanted a language that would be powerful and expressive enough to enable programmers to express complex, abstract, high-level ideas. At the same time, the language would have to be simple and efficient. Soon enough, almost all of Unix itself and the programs many people would use under Unix, including C itself, would be crafted in C, which would suit the task at hand admirably.

C evolved from a previous language Ritchie had created called B, itself a development from BCPL, created a few years previously by Martin Richards at Cambridge. The jury was out for many years as to whether the successor of C would be called D or P (from BCPL), until Bjarne Stroustrup killed off all debate on the issue with his C++.

Why is C so popular, 30 years after its creation1? One reason is the enduring popularity of the Unix operating system; you have to know C pretty well to be able to do just about anything with Unix, and some variant or derivative of Unix. C compilers tend to be simpler than those for other languages, and in the early days, C compilers quickly appeared for all sorts of computers. In 1989, the American National Standards Institute ratified a C standard for all vendors to follow; this was immediately adopted internationally by the International Standards Organisation and by all major compiler vendors.

However, the popularity of C occurred for reasons far beyond mere pragmatics. On a deeper level, C has an enduring appeal for anybody who likes tinkering with computers. C is easy to learn but difficult to master. It can only be mastered by paying careful attention to detail and by repeatedly trying and playing about with little toy programs. C is also fun to program in once you have mastered it - unlike many other languages, where it is very easy to make a start but soon you find they become very irritating the more you use them. C requires more effort to start with, and has a steep learning curve, but C programmers are generally much more productive than any others - and a few lines of C code can often do the work of many more lines of other languages.

It is important to note that although ANSI maintains a standard for C, all compilers need to provide more functionality than just that of the standard. The reason for this is that you can't program effectively using just standard ANSI C. One must use system-based extensions. And so, people all over the world use extensions - Win32 API, POSIX extensions, BSD socket functions, and stuff like that. The upshot is that, although C was intended to be portable, it isn't when extensions aren’t incorporated.

It is also true that C is not really appropriate for large-scale programming. C becomes unwieldy when programs are large; it is partly for this reason that C++ was invented. C++ allows a programmer to use object-orientation as an abstraction tool, but still retains almost all of C as a subset. More recently, Java has also moved into this field. But C still remains strong - and is still eminently suitable for numerous programming tasks. Any time you really need speed and efficiency coupled with maintainability, C is usually a good choice.

A very widely-used compiler for C forms one component of the excellent, and free, GNU Compiler Collection2. Of course, it's also written in C.


1 Noting that 30 years is a very long time in a field as rapidly developing as computing.
2 GCC was formerly the GNU C compiler, but is now wider in scope.


Clip/Bookmark this page
This article has not been bookmarked.
ENTRY DATA
Written and Researched by:

armagod

Edited by:

Hypoman

Referenced Entries:

Java - the Programming Language
Unix
Object-oriented Programming



CONVERSATION TOPICS FOR THIS ENTRY:

Start a new conversation

People have been talking about this Guide Entry. Here are the most recent Conversations:

TITLE
LATEST POST
"C" easy to learn? not likelyNov 28, 2007
Need some help... anyone know matlab?Dec 12, 2003
DJan 27, 2003
A few commentsJan 27, 2003
Very Nice...Mar 22, 2002
CircularFeb 7, 2002
interestingJan 16, 2001
Pain in the assJan 3, 2001
Recursive virusNov 20, 2000




Disclaimer

Most of the content on h2g2 is created by h2g2's Researchers, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the BBC. The BBC is not responsible for the content of any external sites referenced. In the event that you consider anything on this page to be in breach of the site's House Rules, please click here. For any other comments, please start a Conversation above.




About the BBC | Help | Terms of Use | Privacy & Cookies Policy