C Programming Language

C is a procedural (imperative) programming language. It is popular as an alternative to assembly language for writing highly efficient microcomputer programs.  It was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support.

Unlike other general-purpose languages, it gives the programmer complete access to the machine’s internal (bit-by-bit) representation of all types of data. This makes it convenient to perform tasks that would ordinarily require assembly language, and to perform computations in the most efficient way of which the machine is capable.

There is a widespread (and often mistaken) belief that programs written in C are more efficient than programs written in any other language.

C programming language developed at Bell Laboratories in the 1970s, based on the two earlier languages B (1970) and BCPL (1967). A C compiler is provided as a part of the UNIX operating system (see UNIX), and C was used to write most of UNIX itself.

A C programm looks like - 

/* CHKSUM.C */
/* Sample program in C —M. Covington 1991 */
/* Based on a program by McLowery Elrod */
/* Reads a character string from the keyboard */
/* and computes a checksum for it. */

#define N 256
	int i, n;
	char str[N];
	puts(”Type a character string:”);
	printf(”The checksum is %d\n”,chksum(str));
char* s;
int n;
	unsigned c;
	c = 0;
	while (n— >0) c = c + *s++;
	c = c % 256;
Share it:  Cite

More from this Section

  • Lisp Programming
    Because of the ease with which it can handle complex data structures, Lisp is used for ...
  • ActionScript
    ActionScript is a object-oriented programming language for the Adobe Flash Player and ...
  • Procedural programming
    Procedural programming is a concept of programming that specifies a ...
  • Polymorphism
    In object-oriented programming, Polymorphism means the ability to use same named method ...
  • Class
    A Class in object-oriented programming is a template or bluprint  that defines attributes ...