Identifier and its types, Structure of data type and its memory size in C language,
Identifier and its types
Identifier: -
An identifier is the name that presents a variable, constant, data types, function, or label in a program. In the C language, an identifier consists of a combination of alphanumeric characters, such that:
• The first is always a letter of the alphabet or an (_) underscore.
• The remaining can be any letter, numeric digit, or the underscore.
There are two types of identifier in C language.
(1) Standard identifier (2) User-define identifier
(1) Standard identifier: -
The names of defined operations in C language are called identifier. For example, scanf and printf represent input and output functions. These are the standard identifiers.
(2) User- defined identifier: -
These are the names that a programmer assigns to function, data type, variable, etc. in a program.
Structure of data type and its memory size in C language
- Data type Format specifier Data range Memory occupied
- Int % d -32768-> +32767 2 bytes
- Long % ld -2147483648-> +2147483647 4 bytes
- Float % f 3.4*10-38-> 304*10+38 4 bytes
- Double % lf 107*10-108-> 1.7*10+108 8 bytes
- Char % C -128->- +127 1 bytes
Post a Comment