popular computer languages today because it is a structured, machine independent language. • C was evolved by Dennis Ritchie from ALGOL, BCPL, and B at the Bell Laboratories in 1972. • Since it was developed along with the UNIX operating system, it is strongly associated with UNIX. This OS was coded almost entirely in C. • The language gained popularity after publication of the book ‘The C Programming Language’ by Dennis Ritchie and Brian Kerningham in 1978. • The rapid growth of the language led to different versions of the language which were similar but incompatible. To assure the standardization of C, American National Standards Institute (ANSI) appointed a technical committee to define a standard for C in 1983. • The committee approved version of C was released in 1989 and was known as ANSI C. • It has since been approved by the International Standards Organisation (ISO) in 1990. This version was referred to as C89. 1. Creating the program; 2. Compiling the program; 3. Linking the program with functions that are need from the C library; 4. Executing the program.
A programming language is designed to help process certain
kinds of data consisting of numbers, characters and strings to provide output known as information. The processing of data is accomplished by executing a sequence of precise instructions called a program. These instructions are formed using certain symbols and words according to rules known as syntax rules (or grammar). TYPES CHARACTER SET Lowercase letters a-z
Uppercase letters A-Z
Digits 0-9
Special Characters ,.&;:?!”*[]()# etc.
Blank space, Horizontal tab, White spaces Carriage return, New line, Form feed • The smallest individual units are known as C tokens. • C has six types of tokens:
1. Keywords Ex: float, while
2. Identifiers Ex: main, amount 3. Constants Ex: -15.5, 100 4. Strings Ex: “hello”, “year” 5. Special symbols Ex: [], {} 6. Operators Ex: + - * , • All keywords have fixed • Identifiers refer to the meanings and these names of variables, meanings can’t be functions and arrays. changed. • These are user-defined • All keywords must be names and consist of a written in lowercase. sequence of letters and • The types of keywords digits, with a letter as a include auto (ex: char, first character. continue), double (ex: else, float, if), int (ex: long, • Both uppercase and short, signed), struct (ex: lowercase letters are switch, unsigned, while). permitted. CONSTANTS: Fixed values that do not change during execution
NUMERIC CHARACTER
Real: Nos. Single: String:
Integer: A single Sequence of containing character A sequence fractional characters of digits enclosed enclosed in parts within single double quotes quote marks • An expression represents a single data item - usually a number. • The symbols which are used to perform logical and mathematical operations in a C program are called C operators. • The expression may consist of a single entity, such as a constant or variable, or it may consist of some combination of such entities, interconnected by one or more operators. • In looping, a sequence of statements are executed until some conditions for termination of the loop are satisfied. • The C language provides for three constructs for performing loop operations. They are: 1. The while statement 2. The do statement 3. The for statement C is one of the most widely used programming languages of all time, and C compilers are available for the majority of available computer architectures and operating systems. It is rightfully called “The Mother of All Computer Languages”.