Home
Easter Eggs

C Programming Language

About Programming Languages and Introduction C Programming Language

Programming Languages are artificial languages made to convey computations carried out by machines like computers. These languages are used to make programs that manage the behavioural patterns of machines, i.e. to articulate algorithms with precision and even as a method of human communication.

Out of the many programming languages available C programming Language is a multipurpose general computer programming language which was formed at the Bell Telephone Laboratories by Dennis Ritchie in 1972. The primary purpose it was meant to serve was to be used as system software in Unix operating systems. However it is now used more widely to create portable application software. As one of the most well accepted programming languages in the history of computers there are very few computer designs which are not compatible with C programming Language. Other prevalent versions of programming languages like say C++ have been incredibly influenced by C and began merely as an addition to C.    

Designed to be assembled using a simple compiler and to offer low-level entry to memory, C Programming Language provides machine instruction mapping language constructs which require negligible support during run-time. This makes C useful in various other applications which have been traditionally designed using assembly language.

C Programming Language History First phase

C programming language was developed at AT&T Bell Laboratories between the years 1969 and 1973 though Ritchie claims that the most active phase was in 1972. Here are some of the interesting historical details about this programming language:

  • The name ‘C’ was adopted because it was a modified version of a language known as ‘B’. Ken Thompson suggests that B was a rudimentary version of BCPL.
  • It  was when b was found lacking in functionality (byte addressability) that C was developed.
  • Development of C is closely connected with the development of Unix operating system.
  • An assembly language was first used to develop Unix. It was in 1973 when struct types were added that C was rendered powerful enough to write Unix kernel in.
  • Unix was a pioneer of sorts as one of the first OS to be implemented in C, a language type other than assembly. Others include Multics system written in PL/I and Master Control Program for Burroughs B5000 written in ALGOL (1961).

Brian Kernighan and Dennis Ritchie

Brian Kernighan and Dennis Ritchie in 1978, brought out the first edition of a book called The C Programming Language. Affectionately known as the K&R in inner circles, this book was the unofficial specification of the language for years. The language described in the book is known as K&R C. Further editions cover the more recently developed ANSI C.

(American National Standards Institute ) ANSI C

Various editions of C gained popularity among minicomputers, mainframe computers and microcomputers (like IBM PC) in the late1970s and early 1980s. Specifically, in 1983, the American National Standards Institute (ANSI) formulated a committee called X3J11 in order to provide a standard specification for C. The year 1989 saw ratification of the standard as ANSI X3.159-1989 ‘Programming Language C’. It is this version that is informally known as ANSI C, C89 or Standard C.

C1X - Revised Version of Standard C

2007 saw the beginning of work towards another revised version of standard C, unofficially titled ‘C1X’. The standards committee for C has drawn out guidelines to limit inclusion of features which have not been analysed by existent applications.

C Programming Language Basics

The standard structure of a C program includes the following components:

Preprocessor Commands

  • Type definitions
  • Function prototypes
  • Variables
  • Functions

Like any language C too has to follow basic grammar or syntax inherent in this language. Here is a sneak peek at the basics of C language

C Programming Language Characters

Characters used in C Language belong to four classes.

  • Digits
  • Letters
  • Special Characters
  • White Space

Pre-defined C Programming Language Keywords

Certain words have been given fixed functions in this programme and are called keywords.

Examples include

asm auto break case char const continue
default do double else enum extern float
for goto huge if int interrupt long
near register return short signed sizeof static
struct switch typedef typeof union unsigned void
volatile while          

C Programming Language Identifiers

Names of arrays, functions and variables are known as identifiers. These are defined by the user and can either be lower case or upper case though the former is preferred.

C Programming Language Constants

A Constant value is the one which never change during the course of the program execution. C Programming Language supports various types of constants.

  • Integer Constants
  • Real Constants
  • Single Character Constants
  • String Constants

C Programming Language Variables

Data name used to store data value is known as a "Variable" and this may change during the program execution. A variable name should be carefully chosen by the programmer so that its use is reflected in a useful way in the entire program. Variable names are case sensitive.

Example of variable names are:

  • Sun
  • number
  • Salary
  • Emp_name
  • average1

 


   More in Computers