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.