3. TRIGRAPH CHARACTERS :
There are chances or possibilities when the keyboard doesn’t print some characters probably due to any reason. C supports the facility of “TRIGRAPH SEQUENCE” to print these characters.
The Trigraph sequences have three characters. The first two are 2 consecutive question marks i.e. “??“. The third character can be any character from C character set.
These are some of the Trigraph sequences in C elements.
4. DELIMITERS :
Delimiters are one of the most important C elements. They are used in almost every C program for providing the program a Syntactic meaning.
Basically, a Delimiter is an order of a number of characters which defines the beginning or ending of a particular statement.
Above given are the Delimiters which we use in a C Program.
5. KEYWORDS :
Keywords are those specific words that the compiler reserves or retains in the library for doing some certain tasks. These are unique words, they have Standard and have a predefine meaning in C.
Keywords are always written in lowercase because C Language is a case sensitive Language.
In C Language, there are only 32 keywords available which are given below –
6. IDENTIFIERS :
All the words that we all will use in C programs will be either KEYWORDS and IDENTIFIERS. Keywords are the predefined words and can’t be changed by the user. In contrast, Identifiers are user defined words which we use to give names to entities such as
There are certain rules which the user should follow while naming identifiers. The rules for naming identifiers are Given below –
- The name should consist of only alphabets that maybe in both uppercase or lowercase, digits and underscore sign(_).
- The first character of the identifier should be an alphabet or an underscore.
- The name of the identifier should not be a keyword.
- Because C is a case sensitive language, the uppercase and lowercase letters are consider differently. For example, add, Add and ADD are three different identifiers.
- An identifier name maybe whimsically long. Some implementations of C language recognise only the first eight characters, and most implementations recognise 31 characters.
Generally, identifiers are given meaningful names by the users. Some examples of valid identifier names are –
Some examples of invalid identifier names are –
- 3add – the first character should be an alphabet on an underscore.
- Char – char is a keyword
- VAlue# – # is a special character
- Avg no – blank space should not be there in between..
7. DATA TYPES :
C Language sustains various types of data. Data type is simply defined as the type and size of the data linked with variables and functions. The Storage representation of these data types varies in C memory.
ANSI C supports four classes of data types that are
- FUNDAMENTAL DATA TYPES
- USER-DEFINED DATA TYPES
- DERIVED DATA TYPES
- EMPTY DATA SET
There are four fundamental data types in C which every compiler supports. They are int, char, float and double.
USES OF FOUR FUNDAMENTAL DATA TYPES :”
- “char” data type for storing any single character.
- “int” data type for storing integer value.
- “float” data type for storing single precision floating point number or decimal values.
- “double” data type for storing double Precision floating point number.
To get some more types, we can also use Type qualifiers with these basic data types. There are two types of type qualifiers which are –
- SIZE QUALIFIERS – short, long
- SIGN QUALIFIERS – signed, unsigned
By using the qualifier Unsigned, the number is therefore always positive. The number maybe positive or negative by using Signed qualifier. If the sign qualifier is not mentioned by the user, then by default signed qualifier is presumed by the compiler.
The size and range of different data types on a 16-bit machine is given in the following table. [ The size and range may vary on machines with different word sizes ]