Skip to main content

1. Introduction to C Programming

 

What is C ?

C is a general-purpose programming language which is developed by Dennis Ritchie in 1972 at Bell laboratories of AT&T (American Telephone and Telegraph), located in USA for creating system applications that directly interact with the hardware devices.
C has been used to write everything from operating systems to complex programs. The versatility of C is by design. It is a mid-level programming language that relates closely to the way machines work while still being easy to learn.

It can be defined by the following ways :

  1. Mother language
  2. System Programming Language
  3. Procedure-Oriented Programming Language
  4. Structured Programming Language
  5. Mid-Level Programming Language

1. C as a Mother Language

C language is considered as the mother language of all the modern programming languages because most of the compilers, JVM's, Kernels, etc. are written in C language, and most of the programming languages follows C syntax, for example, C++, Java, C#, etc.

2. C as a System Programming Language

A system programming language is used to create system software.It can be used to do low-level programming. It is generally used to create hardware devices, OS, drivers, kernels etc.

3. C as a Procedural Language

A procedural language specifies a series of steps for the program to solve the problem. A procedural language breaks the program into functions, data structures, etc.
C is a procedural language. In C, variables and function prototypes must be declared before being used.

4. C as a Structured Programming Language

Structure means to break a program into parts or blocks so that it may be easy to understand.
In the C language, we break the program into parts using functions. It makes the program easier to understand and modify.

5. C as a Mid-Level Programming Language

C is considered as a middle-level language because it supports the features of both low-level and high-level programming languages. C language program is converted into assembly codes, it supports pointer arithmetic (low-level), but it is machine independent (a feature of high-level).

Features of C Language

C is widely used language. It provides many features that are as :

1. Simple

C is a simple language in the sense that it provides a structured approach (to break the problem into parts), the rich set of library, functions, data types, erc.

2. Machine Independent or Portable

Unlike assembly language, C programs can be executed on different machines with some machine specific changes. Therefore, C is a machine independent language.

3. Mid-Level Programming Language

Although, C is intended to do low-level programming. It also supports the features of a high-level language. That is why it is known as mid-level language.

4. Rich Library

C provides a lot of inbuilt functions that make the development fast.

5. Memory Management

It supports the feature of dynamic memory management. In C language, we can free the allocated memory at any time by calling the free() function.

6. Pointers

C provides the features of pointers. We can directly interact with the memory by using the pointers.

7. Recursion

In C, we can call the functions within the functions. It provides code reusability for every function.

8. Extensible

C language is extensible because it can easily adopt new features.


Comments