Blog



C language tutorial: What is C?
Jacobus Erasmus, 28 July 2018

C is one of the most popular general-purpose programming languages. Around 1972, Dennis Ritchie created the C language at AT&T Bell Labs. Ritchie originally developed C for the UNIX operating system. Indeed, the UNIX operating system, most UNIX applications, the C compiler, and most modern programming languages are written in C.

C has strong roots in the language BCPL (developed by Martin Richards) and the language B (developed by Ken Thompson). However, unlike BCPL and B, C is not a type-less language but has various data types, such as characters, integers, and floating point numbers.

C is often called a 'Low level' programming language. This label is justified by the fact that C programming involves interacting with the fundamental machine objects: numbers, characters, and memory addresses. In a way, C is one step above Assembly language. Consequently, optimised C programs outperform (in terms of execution speed) most, if not all, optimised programs written in higher level languages, such as Java, Python, and Ruby.

Why should you, as a programmer, learn C? Well, there are at least three reasons. First, learning C is one of the best ways to learn the inner workings of the CPU, especially the memory cells in the CPU. Through a thing called 'pointers', C gives us the ability to work with and manipulate machine memory. Higher level languages rob programmers of this educational experience.

Second, C may be viewed as the Latin of modern programming languages. Most modern languages use many of C's concepts, syntax, and keywords. As a result, learning C makes it easier to learn and understand modern languages.

Finally, for some situations, C is the best tool for the job. A good programmer should be able to use the best tool for the job. Since C is faster than higher level languages, C is often a better option for the process intensive parts of a system. If you need speed, you need C. However, if you do not know C, you will be stuck with your higher level tools.


Exercises

Do some searching and then, in one or two brief sentences, describe the difference between C and C++.