Character Set: The Character set of C Language has alphabets, numbers and special symbols as shown below:
- Alphabets including lower and upper case letters
- Numbers 0-9
- Special Characters like ; , : { / \ ^ # @
Keywords are reserved words which have standard, predefined meaning. They can also be called as program-defined Identifier. They should be use in lower case. They are 32 in number.
List of C keywords:
char while do typedef auto
int if else switch case
printf double struct break static
long enum register extern return
union const float short unsigned
continue for signed void default
goto sizeof volatile
Data type is the format of data elements that are stored in the program. A datatype determines:
- Type of data
- permissible range of values that it can store
- Memory requirement
Four Basic data types in C Language: int, char, float and Double
Program Element is a basic building block that is used to construct program. Program Elements are two types:
- Data element Eg: variable, array
- Code element Eg: function
Identifier is the name given to various program elements such as constants, variables, functions and arrays etc.
Rules for naming an Identifier:
- It consists of letters and numbers
- First character must be an alphabet or underscore
- Both upper and lower case are allowed. Eg: TEXT is different from text
- No special symbols are allowed
Examples of Valid Identifiers: X, X123, _XI, temp, tax_rate
Examples of Invalid Identifiers: 123, “X”, Order-no, error flag