Fundamental

Fundamental of C language

* C was developed by Dennis Ritchie in 1972.

* C has its own Character set and Reserved words.

* It has four basic data types int, char, float and double, and derived data type.

* Qualifiers such as short, long, signed and unsigned may precede basic data types specific memory representation of a data type.

* C supports numeric constants, character constants and string constants.

* Symbolic constants are used to give names for constants.

* An escape sequence is a special character starting with a backslash is made to escape; it can be represented in a character constant or in a string constant.

* Comments can also be include in a program to improve the readability of the program.

* Each individual unit in a C program is called token.

* A separator is used to separate tokens, whereas, a semicolon is used as a statement terminator.


Identifier

An identifier is a symbolic name used to refer to an entity such as a data type, constant, variable, function, array etc., in a program. It is a sequence of characters string with an alphabet or underscore that may be followed by alphanumeric characters and underscores.


Variable and Constants

A variable is an identifier used for storing data in a program. The value stored in a variable may be changed during the execution of a program. A constant is a fixed value directly used in any program and it is unchanged during the execution of the program.


Scalar Data Type

A scalar data type is used for representing a single value only. For example, int, char, float and double.


Derived Data Type

Derived data types are derived from the scalar data types with additional relationships between the various elements of that scalar data type. They are also known as structured data types. Derived data type may be used for representing a single value or multiple values.


Escape Sequence

An escape sequence is used to escape from the normal meaning of a character in a C program. It is used for editing non graphic characters in a program. It is a character representation that may appear in a character constant or in a string constant. For example, \n \t \a \” \\.


Token

A token is an individual entity of a program. A compiler identifies and splits a program into a number of tokens. It always constitutes the largest possible token.


ANSI C Standard

American National Standards Institute (ANSI) established a committee X3J11 in 1983 to standardize C language. The committee’s work was finally ratified as ANSI X3.159-1989 on 14th December 1989 and published in 1990. The standard has been adopted as an international standard ISO/IEC 9899:1990 and this replaces the earlier X3.159. Now a new Standard is developed which is nicknamed C9X. It is generally known as C99 because ISO standard was formally adopted in the year 1999. The previous standard ratified in 1989 is called C89.

0 comments:

Post a Comment