A new programming language is invented to address various needs and challenges in the existing languages.
Why C invented?
-
Portability: During 1990s, there was a proliferation of different computer architectures and operating systems. Programmers faced challenges when writing software that needed to run on multiple platforms because each system had its own assembly language and unique features. C was designed to be a portable language that could be easily adapted to different hardware platforms, allowing developers to write code that could run on various systems without major modifications.
-
Efficiency: C was created as a compromise between high-level languages (low performance & high ease of use) and low-level assembly language (high performance but very complex). C provided the flexibility and expressiveness of a high-level language while offering close-to-the-hardware control and efficiency similar to assembly language.
-
Operating System Programming: At the time of its creation, operating systems were typically written in assembly language, which made them highly dependent on the underlying hardware. C offered a more structured and portable alternative for writing system software like compilers, assemblers, and operating systems.
-
Simplicity and Clarity: Earlier programming languages like ALGOL and PL/I were powerful but complex, making them difficult to learn and use. C was designed to be simple and straightforward, with a minimalistic syntax and a small set of powerful features. Its simplicity made it accessible to a wide range of programmers and contributed to its popularity and widespread adoption.
-
Structured programming language: We can break the program into parts using functions. So, it is easy to understand and modify. Functions also provide code reusability.
-
Rich Library: lots of inbuilt functions.