History of C Programming Language.
C was created in 1972 at Bell Laboratories of USA by a team lead by Dennis Ritchie and he called his new language as the C because it was the successor of the existing language at that time called as the B language. This B language was influenced by another language called as BCPL.
Originally this C language was created to write the operating systems and compilers but later because of its simplicity and its features it became one of the popular programming language and even to this day it is one of the popular programming language used.
C is an excellent language which encapsulates a lot of characteristics. But we will study some of its main characteristics in brief.
Features of C
1. Low Level Features: C Programming provides various low level features that are generally provided by the Lower level languages. C is closely related to Lower level Language such as “Assembly Language“ which use mnemonic codes.
2. Portability: This is the one of the most preferable feature of the C language. As discussed earlier C language uses compilers which brings its portability. The portability means it is possible for C programs to run it on different PCs or systems.
3. Key Features
- C provides a wide range of Data Types and functions.
- Various useful Control & Loop Control Statements can be implemented.
- Contains rich set of operators.
- C allows the user to add functions to the library.
4. Modular Programming: Modular programming is a software design technique in which software is break down into separate parts, called modules. C Program Consist of Different Modules that are integrated together to form complete program
5. More Efficient: It is more efficient language and simpler to use. It is an ideal language for beginners.
6. Extendability: Ability to extend the existing software by adding new features is called as extendability.
7. Flexibility: ‘C’ language has right number of reverse words which allows the programmers to have complete control on the language. ‘C’ is also called as programmer’s language since it allows programmers to induce creativeness into the programmers.
Why Should I Study C language
As a programmer, the programming language that you choose should offer a lot of benefits to you. It should be the most efficient, a reliable language. It should be a simple language and it should be easy to learn and it should be platform independent. And this c language has all these features.
#1 Easy to learn: c is really easy to learn. that’s why c is suggested for the guys who are interested in learn computer programming.
#2 It will help you to learn other languages effectively. Learning C++ or Java directly is not an easy task. Its because this C++ or Java uses some object oriented programming approach.
This object oriented programming approach introduces some concepts or the advanced concepts like classes, objects then inheritance then polymorphism and templates and many more. To understand these complex concepts, you should be aware of the basic language elements and for that c is the best place to start.
If you are good in basic language elements, or you know the basic language elements, then you can learn these object oriented languages a lot easier.
#3 Performance. if you talk about the performance or the speed of execution, no other language can beat c. C’s speed of execution is almost close to the assembly level languages. Because of this reason, major parts of the operating systems like Windows or the Linux or the Unix are written in c.
#4 It can handle low-level activities. Then if you have to closely interact with the hardware without compromising the performance, then c is gonna be your first choice.
Just think that you are coding for a microwave oven, or the washing machine, where the performance is the major factor and you have very less resources are available. At that time you can use this c language to code for that.
Structure of a Basic C Program
The structure of C language consists of six important segments. These are documentation section, link section, definition section, global declaration section, main ()function, and other executable functions of the program (as shown in Figure 1).
Figure 1 Structure of a C Program
Let us understand what each of the sections in a C program is meant for.
- Documentation section: This part is sort of an introduction to the program given as comments which include the name of the programmer and the name of the program.
- Link section: This section provides instructions to the compiler to functions from the system library.
- Definition section: All constants are defined in this section.
- Global declaration section: The variables that a programmer uses more than once in the program are declared here.
- main () function: It is the most important part of the program as this function executes all the instructions defined in the subprogram section and the output is generated.
- Subprogram section: A given program may have separate subprograms or functions which include a particular type of instruction such as addition or multiplication of two numbers, etc., and this instruction is executed in the main () function for output.
Where C is most used?
c is often more used in the projects where you have to closely interact with the hardwares, where program execution speed is critical factor. Some of the projects where c is mainly used are
- Operating Systems
- Language Compilers
- Text Editors
- Network Drivers
- Modern Programs
- Language Interpreters
- Embedded devices