double data type –
double data type is one of the fundamental data types which we use for storing double precision floating point number.
Generally, a double data type takes 8 bytes from the memory.
Here, the data_type is double and the variable_name is of user’s choice.
void data type –
void data type is one of the fundamental data types which explicitly declares a function as returning no value. And also, it creates generic pointers.
Generally, we do not use any modifier or type specifier preceding them.
Here, Data_type is void. The function_name is any user-define function. Finally, the arguments are the different variables of different data types.
void fun( )
Here, the Data_type void represents that the function doesn’t return anything. The output of the above program is,
MODIFIERS OR TYPE SPECIFIERS :
Generally, we can use Modifiers or type specifiers with the fundamental data types to get some more types. Except for data type void, the fundamental data types may have various modifiers or type specifiers preceding them.
Certainly, we use a modifier or type specifier for a specific reason. It alters the meaning of the base data types to fit various situations more precisely.
We can use the following modifiers or type specifiers..
- Size qualifiers – SHORT, LONG
- Sign qualifiers – SIGNED, UNSIGNED
Furthermore, when we use qualifier unsigned, the number is always positive. On the other side, when we use qualifier signed the number may be positive or negative.
The above picture represents the size and range of different data types with type specifiers with their format.