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

  • Variable
    Variable is a computer programming term which refers to a named memory location (storage) ...
  • Inheritance
    Inheritance is the most important feature of Object-Oriented Programming. Inheritance ...
  • Data Types
    Generally data types refer to the classification of various types of data that a computer ...
  • BASIC Programming
    BASIC (Beginner’s All-purpose Symbolic Instruction Code) is a programming language designed ...
  • Bit
    Bit is an electronic signal that denotes a zero or a one; the smallest unit of representation ...