• C Programming Video Tutorials

C - Features



Dennis Ritchie and Ken Thompson developed the C programming language in 1972, primarily to re-implement the Unix kernel. Because of its features such as low-level memory access, portability and cross-platform nature etc., C is still extremely popular. Most of the features of C have found their way in many other programming languages.

The development of C has proven to be a landmark step in the history of computing. Even though different programming languages and technologies dominate today in different application areas, such as web development, mobile apps, device drivers and utilities, embedded systems etc., the underlying technologies of all of them are inspired by the features of C language.

The utility of any technology depends on its important features. The features also determine its area of application. In this chapter, we shall take an overview of some of the significant features of C language.

The important features of the C language are given as follows:

1. Procedural and Structured Language

C is described as procedure-oriented and structured programming language. A language is said to be procedural where the program is a series of instructions that explain the procedure of solving a given problem. This makes the development easier. In C, the logic of the process can be expressed in structured or modular form with the use of function calls. C is usually used as an introductory language to introduce programming to school students because of this feature.

2. General-Purpose Language

The C language hasn't been developed with a specific area of application as a target. From system programming to photo editing software, the C programming language is used in various applications. Some of the common applications are development of OS and its utilities, databases, device drivers etc.

3. Fast

C is a compiler-based language. This makes the compilation and execution of codes faster. The source code is translated into the hardware-specific machine code, which is easier for the CPU to execute, without any virtual machine, as some of the other languages like Java need. The fact that C is a statically typed language, also makes it faster compared to dynamically typed languages. Being a compiler-based language, it is faster as compared to interpreter-based languages.

4. Portability

Another feature of the C language is portability. C programs are machine-independent which means that you can compile and run the same code on various machines with none or some machine-specific changes. Hence, it provides the functionality of using a single code on multiple systems depending on the requirement.

5. Extensibility

C is an extensible language. This means that if a code is already written, you can add new features to it with a few alterations. Basically, it allows adding new features, functionalities, and operations to an existing C program.

6. Standard Libraries

Most of the C compilers are bundled with an extensive set of libraries with several built-in functions that for a number of purposes. It includes OS-specific utilities, string manipulation, mathematical function etc. Importantly, you can also create your user-defined functions and add them to C libraries. The availability of such a vast scope of functions and operations allows a programmer to build a vast array of programs and applications.

7. Pointers

One of the unique features of C is its ability to manipulate the internal memory of the computer. With the use of pointers in C, you can directly interact with memory. As the name suggests, pointers point to a specific location in the memory and interact directly with it. Using the C pointers, you can interact with external hardware devices, interrupts etc.

8. Middle-Level Programming Language

Use of mnemonic keywords, user-defined identifiers, modularity etc. these are the features of a high-level languages. On the other hand, C provides a low-level access to the memory. This makes it a mid-level language. And as a mid-level programming language, it provides the best of both worlds. For instance, C allows direct manipulation of hardware, which high-level programming languages do not offer.

9. Rich Set of Built-in Operators

C is perhaps the language with the most number of built-in operators which are used in writing complex or simplified C programs. In addition to the traditional arithmetic and comparison operators, its binary and pointer related operators are important when bit level manipulations are required.

10. Recursion

C language provides the feature of recursion. Recursion means that you can create a function that can call itself multiple times until a given condition is true, just like the loops. Recursion in C programming provides the functionality of code reusability and backtracking.

11. User-Defined Types

C has three basic data types int, float, and char. However, the provision to define a data type of any combination of these types makes it very powerful. In C, you can define structures and union types. You also have the feature of declaring enumerated data types.

12. Preprocessor Directives

In C, #include, #define etc. are known as preprocessor directives. They are not the language keywords. Some important roles such as importing functions from the library, defining and expanding macros etc. are done by the preprocessor directives.

13. File Handling

C language doesn't directly manipulate files or streams. Handling file IO is not part of the C language itself but instead is handled by libraries and their associated header files. File handling is generally implemented through high-level I/O which works through streams. C identifies stdin, stdout and stderr as standard input, output and error streams. These streams can be directed to a disk file to perform read/write operations.

These are some of the important features of C language, that make C as one of the most used computer language.

Advertisements