Keyword is a word in C language that has predefined meaning and purpose. The meaning and purpose of a keyword is defined by the developer of the language. It cannot be changed or redefined by the user. Keyword can be used for the same purpose for which it is defined. They help the compiler in compilation process. Keywords are written in lowercase.
Keywords are also known as reserved words. There are different types of keywords in C programming language. The total number of keywords in C programming language is 32.
The following is the list of keywords in C programming language:
The identifiers are the names used to represent variables, constants, types, functions and labels in the program. Identifier is an important feature of all computer languages. A good identifier name should be descriptive but it should be short.
The following are some important rules for naming identifiers:
- The first character must be an alphabet or an underscore (_).
- The identifier name must consist of only alphabetic characters, digits and underscore (_).
- The reserved words cannot be used as the name of identifiers.
- Special characters are not allowed such as semi colon, period, comma, etc are not allowed in the name of identifier.
In C programming language there are two types of identifiers:
- Standard Identifiers
- User defined Identifiers
A type of identifier that has special meaning in C programming language is known as standard identifier. C programming language cannot use a standard identifier for its original purpose if it is redefined.
A type of identifier that is defined by the programmer to access memory location is known as user defined identifier. The user defined identifiers are used to store data and program results.
A name of variable that is defined by the user can be given as an example of identifier for example int a, float avg.
The characters in C programming language can consist of following: letters, digits, special characters and whitespaces. Special characters include semicolon, comma, period, etc.