beanz Magazine

C

Bill Bradford on Flickr

The C programming language is used often in operating systems and has influenced other languages for decades.

Created between 1969 and 1973 by Dennis Ritchie at AT&T Bell Laboratories, C is among the most successful programming languages of computing history. It is still quite popular today, and has inspired various others such as Java, C++, Perl, Python, PHP, Javascript or Go. In fact, anyone familiar with one of these languages will be able to naturally read C code, and will have an easier time learning it.

Knowing C is in this matter very useful, as its wide influence made it a good language to refer yourself to when learning a new one.

C is a general purpose language with a strong orientation towards low-level system programming.
It was first used as a replacement to assembly language during the early days of the Unix operating system developed at Bell Labs, enabling code portability between different machines.

The name C was chosen because it borrowed a lot of features from the B programming language, created by Ritchie’s colleague Ken Thompson.

Surprisingly, C was for almost a decade only specified by a book: “The C programming language” (aka “the white book” due to the color of the cover), written by Brian Kernighan and Dennis Ritchie himself in 1978. This book is still considered by many as the bible of C programming.
The version described in it is known as K&R C. It has since then been standardized by the American National Standards Institute.

What Makes C Special?

C is an imperative programming language, which means that its syntax is composed of statements dictating the actions of the program, and the changes of its state.

The language was designed with low-level access to the computer resources in mind, and therefore enables efficient management of memory.
One of C’s peculiarities, compared to higher level languages, is the possibility to manipulate pointers, which are references to an object (i.e. a variable) or a function in memory.
"¨Its main advantage compared to assembly code is portability. In fact, a well written C program can easily be compiled to target various operating systems, with very little changes to its original source code. Another quality of C is speed. Programs in C run almost, if not as fast as assembly code programs. The reason why hand written assembly code does in some cases run faster is that the programmer can then specify every detail of execution.

How is C Used?

System programming is one of the most common use case of this language. C is especially known to be the language of the Linux operating system. In fact, almost every operating system is implemented in C.

Its wide availability, low system resources usage, speed, and portability have made it used in a wide range of computer platforms, from embedded systems and mobile devices to supercomputers.

Its speed makes it a good language in order to write compilers or interpreters for other languages. For example, the Haskell’s compiler is written in C.

Even though it’s not as common as it once was, you can write user applications in C. But higher level languages such as Java are often preferred today to write these, as their additional layers of abstraction enable the programmer to quickly write working programs.

Learn More

C Basics

http://www.le.ac.uk/users/rjm1/cotter/page_04.htm
http://www.physics.drexel.edu/courses/Comp_Phys/General/C_basics/
http://www.loirak.com/prog/ctutor.php

Reference Manual

https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html
http://www.c-faq.com/

C History

http://cm.bell-labs.com/cm/cs/who/dmr/chist.html
http://en.wikipedia.org/wiki/C_%28programming_language%29

Also In The November 2014 Issue

Find Summer Tech Camps

It's that time of year: time to start thinking of summer tech camps for 2015. Here are a few ideas where to begin looking.

Rachel Manning Talks Software Development and the Freelance Life

Rachel Manning talks about her life as a freelance software developer building websites and web applications from her home in Mammoth Lakes, California.

Holiday Toy Ideas

Here are lots of ideas for computer science and programming toys kids might like, based on different age groups.

Create a Website with Wix

Wix.com is a free online tool you can use to create a website. Here's a basic tutorial to get started, as well as files to build a test site.

Chris Bradfield Talks Coding, Games, and Helping Kids Code

Chris talks about his journey from TRS-80 computers to websites to the game business to teaching kids to code in summer camp.

Control Flow

How do programming languages control the flow or processing of instructions? Here's how control flows work in several languages.

Destinations and Systems

Designers of products, content, and software use the concepts of destinations and systems to create content and apps for all our devices.

If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.

November 2014 Learn More Links

Links from the bottom of all the November 2014 articles, collected in one place for you to print, share, or bookmark.

November 2014 News Wire

Interesting stories about computer science, software programming, and technology for October 2014.

FTP

FTP is a mysterious yet extremely useful way to send data across computer networks. Here's a short overview with links.

Coding Books for Kids

No Starch Press sent along four books for kids. If you don't have them already, look them up at the library or buy online or in a bookstore.