Saturday, 26 May 2012

Keywords And Identifiers

C Programming Keywords Identifiers :
Every C word is classified as either a keyword or an identifier. All keywords have fixed meanings and these meanings cannot be changed. Keywords serve as basic building blocks for program state¬ments. The list of all keywords of ANSI C are listed in Table 2.3. All keywords must be written in lowercase. Some compilers may use additional keywords that must be identified from the C manual.


Identifiers refer to the names of variables, functions and arrays. These are user-defined names and consist of a sequence of letters and digits, with a letter as a first character. Both uppercase and lowercase letters are permitted, although lowercase letters are commonly used. The underscore character is also permitted in identifiers. It is usually used as a link between two words in long identifiers.


Thursday, 17 May 2012

C Tokens

C Programming:
In a passage of text, individual words and punctuation marks are called tokens. Similarly, in a c program the smallest individual units are known as C tokens. C has six types of tokens as shown in Fig. C programs are written using these tokens and the syntax of the language.

C Tokens

Friday, 11 May 2012

Character Set


Character Set: 
The characters that can be used to form words, numbers and expressions depend upon the computer on which the program is run. However, a subset of characters is available that can be used on most personal, micro, mini and mainframe computers. The characters in C are grouped into the following categories:
1. Letters
2. Digits
3. Special characters
4. White spaces
The entire character set is given in Table .
The compiler ignores white spaces unless they are a part of a string constant. White spaces may h, used to separate words, but are prohibited between the characters of keywords and identifiers.

Character Set

Trigraph Characters:
Many non-English keyboards do not support all the characters mentioned in Table . Trigraph- sequences to provide a way to enter certain characters that are not available on some keyboards. Each trigraph sequence consists of three characters (two question marks followed by another character) as shown in Table .


Trigraph Characters