Difference Between Fundamental Data Types and Derived Data Types
Having discussed the two categories of data types available in computer programming briefly, we will now be discussing the difference between fundamental data types and derived data types. The difference between fundamental data types and derived data types are as follows:
Key Differences Between Fundamental Data Types and Derived Data Types
Fundamental Data Types
Derived Data Types
They are referred to as primitive types or basic types.
They are referred to as aggregate types as they are formed by the aggregation of basic types.
Fundamental types are int, char, float, etc.
Derived types are array, structure, union, etc.
The integer type is classified as signed int, unsigned int, long int, and short int.
Pointers are used to store the address of variables.
Integers are used to store integer values in the range.
An array data type is used to store the homogenous data items.
The float type stores decimal numbers.
The structure uses primitive data types. It stores heterogeneous data.
What is the Fundamental Data Type in C Programming?
In C programming, the fundamental data type or primitive data type refers to the set of values that a data item may take. Every variable in C is associated with a data type. Each type requires some amount of memory and has operations associated with it.
In C, the fundamental data type is also called basic data type or primitive data type. Each basic data type has a range of valid values and sizes in bytes associated with them. These basic data types are divided into four types, as shown in the below table:
Size of Bytes
–128 to 127
To store characters
–32768 to 32767
To store integer numbers
3.4E–38 to 3.4E+38
To store floating-point numbers
1.7E–308 to 1.7E+308
To store big floating-point numbers
What is the Derived Data Type in C Programming?
In C, the derived data types are defined by the user. This is the basic difference between fundamental data types and derived data types, as fundamental data types are predefined for the language and cannot be modified or redefined by the user or programmer. It is formed by combining one or more basic data types.
By using derived data types, we can develop a variety of new types from the basic types. The derived data types are available to provide convenience to the programmer in writing long source codes. Widely used derived data types in C programming are array and structures. Apart from array and structures, we have union and enumeration.
Check out some important topics related to the difference between Fundamental Data Types and Derived Data Types in the table provided below: