5. DATA TYPE
Data Type specifies the size and type of values that can be stored in an variable.
int (2 byte) : -32768 to 32767
char (1 byte) : -128 to 127
float (4 byte) : 1.75e-38 to 3.4e+38
double (8 byte) :
Program to find Data Type Size
void main( )
printf(“%d”, sizeof(a)); // %d is format specifier
Identifier refers to the name of memory location where we store data.
a is variable
Type of variable
Program to demonstrate local, global and static variable.
int a; // global variable is used anywhere in the program
in b; / / local variable is used within the function
static int c; // static variable is used within the function
/* Local variable make memory location every time whenever it is called where as static variable make memory location only single time. */
// : Single line comment
/* /* : Multi line comment
Comment is not the part of program. It is used to explain what is done within the program.
Identifier refers to the name that is used to identify variables, functions, array, pointer, structure, union.
a is identifier
void sum ( )
sum ( ) is identifier
All variables are identifier but all identifier are not variable.