The World According to C

Why C?

It's turtles all the way down!

Why should we bother with such an "old-fashioned" language? Haven't Python and Ruby and Java and... replaced C? And it's so hard to use!

The popularity of various languages. C is in red.

C: "All the speed of assembly, with all the ease of use of assembly."

But an operating system needs to have direct access to memory, device drivers, etc. C delivers that in a structured language.
Compare:

                       
                       if(i > j)
                       {
                            z = 1;
                       }
                       else
                       {
                            z = 0;
                       }
                       ...

                                  cmp i, j
                                  jne set_zero
                                  mov z, 1
                                  jump continue
                        set_zero: mov z, 0
                        continue: ...
                       
                       
                   

Header files

Building a larger C program

External Links