Skip to main content

Introduction of C.

History of C :

  • The C language was developed by Dennis Ritchie in 1970s at AT&T Bell Laboratories, Murray Hill,New Jersey.
  • Initially it was designed for programming in the operating system called UNIX operating system was rewritten using it.
  • Now almost the entire UNIX operating System and the tools supplied with it including the C compiler itself are written in C.
  • The C language is derived from the B language,which was written by Ken Thompson at At&T Bell laboratories.The B language was adopted from a language called BCPL (Basic Combined programming Language) ,which was developed by Martin Richards at Cambridge University.
  • In 1982 a committee was formed by ANSI (American National Standard Institute) to standardize the C language.Finally in 1989,the standard for C language was introduced known as ANSI C.

Characteristics of C :

  • C has simplicity of a high level language as well as the power of a low level language.That is why this middle level language is used in writing both Application programs and System Programs.
  • C has only 32 English words known as keywords.( if,else,for,while,etc).
  • C is also having its own library functions.
  • C is known as Structured Programming language as it contains control constructs needed to write a structured program.
  • C provides bit wise operators for bit level manipulation.

Structure Of C Programs :

/* comment (Can be one or multiple lines) */
  Preprocessor directives  (i.e. #include<stdio.h>)
  function prototype
  int main()
{

local variables
statements
........................    /* comment (Can be one or multiple lines) */
........................
//Comment         (one line comment)
return 0;
}
function1()
{
local variables
statements
........................
........................
}
function2()
{
local variables
statements
........................
........................
}
  • Comments can be written anywhere in a program as shown above manner.
  • C program execution starts from the main function.
  • C Program may have more than one user defined functions.

 

Compilation Stages Of C Program :

compilationa-and-execution