Saturday, December 14, 2019

Introduction to C Programming

  • C is a general purpose programming languages that is extremely popular, simple and flexible. It is machine independent, structured programming language, which is used in various application. 
  • It was developed by Dennis Ritchie at AT & T Bell Laboratories in 1972.
  • It can be defined by the following way i.e.
  1. Mother Language
  2. System Programming Language 
  3. Procedure oriented Programming language
  4. Structure programming language
  5. Mid-level Programming language



1. C as Mother Language:

    C language is considered as the mother language of all the modern programming languages because most of the compilers JVMs(Java Virtual Machine) Kernels are written in C language & most of the programming language follows the C syntax.
e.g. C#, JAVA, C++ etc.

2. C as a System Programming Language:

    A system programming language is used to create system software. C language is a system programming language because is can be used to do low level programming. It is generally used to create hardware devices, OS, drives etc

3. C as a Procedure Programming Language:

    A procedure language specify a series of steps for the program to solve the problem. A procedure language breaks the program into function, data, structure etc.

4. C as a Structure Programming Language:

    A structure programming language is a subset of a procedure 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 function. 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 because it supports the features of both low level and high level language.
    A low level language is specific to one machine that is machine dependent. It is machine dependent fast to run but it is not easy to understand.
    A high level language is not specific towards machine that is machine independent it is easy to understand.


Features of C Language

C provide many features i.e.
  • Simple
  • Machine independent or portable
  • Mid-level programming language
  • Structured programming language
  • Rich library 
  • Memory management
  • Fast speed
  • Pointers
  • Recursion
  • Extendable

i. Simple:

    C is a simple language in the sense that is provide a structure approach (to break the problem into parts). The rich set of library functions data types etc.

ii. Portable or Machine independent:

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

iii. Mid-level Programming language:

    Although C is intended to do low level Programming. It is used to developed System applications such as OS, Kernel, drives etc. It also support the features of a high level language that's why it is known as mid level language

iv. Structure Programming language:

    C is a structure programming language in the sense of that we can break the program into parts using functions, so it is easy to understand and modify.

v. Rich library:

    C Provides a lot of inbuilt functions that make the development fast. It also provides a lot of library functions.

vi. Memory Management:

    It support the features of dynamic memory allocation. In C language we can free the allocated memory at any time by calling the free function.

vii. speed:

    The compilation and execution time of C language is fast since there are lesser inbuilt function and hence the lesser overhead.

viii. Pointers:

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

ix. Recursion:

    In C we can called the function within the function which is called recursion. It provides code re-usability for every functions.

x. Extendable:

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

No comments:

Post a Comment