Tokens
In a passage of text and usual words and punctuation marks are called Tokens. In a C program the smallest individual unit are also known as Tokens.
- Keywords have predefined uses and cannot be used for any other purpose in a C program.
- They are used by compiler to compile the program.
- They are always written in lowercase letters.
- There are Thirty two (32) keywords defined in C.
Identifiers
An identifier is a sequence of characters created by the programmer to identify or name a specific object. The sequence of characters may be letters, digits, and the special character ('_' )known as an underscore. They include variables, arrays,functions, pointers, etc.
Rules for creating Identifiers
- Identifiers are case sensitive.
- Only alphabets can be used as the first character of the identifier.
- An identifier should not be a keyword
Variables
- A variable is an identifier for a memory location in which data can be stored and recalled.
- Variables are used for holding data values so that they can be utilized in various computations in a program.
- All variables have two different attributes -
- A data type is established when a variable is defined. Once defined, the type of C variable cannot be changed.
- The value can be changed by assigning new value to the variable. The type of the values depends upon the data type of the variable.
No comments:
Post a Comment
If u need any help,