Difference between Fundamental data types and derived Data Types


In computer programming, a datatype represents the type and nature of data that is to be used by the user. It is the data type that tells the compiler or interpreter how to deal with the data and provide corresponding storing location in computer memory.

According to the nature of data, the data types can be of two types namely Fundamental Datatype and Derived Datatype. Both these datatypes are extensively used in computer programming. They are equally important when we require to implement the business logic over the data.

Read this tutorial to find out more about Fundamental and Derived data types and how they are different from each other.

What are Fundamental Datatypes?

A Fundamental Datatype is one which is a concrete form of data type, and it is introduced by the programming language itself. Therefore, a fundamental datatype has its own fundamental characteristics and properties defined in the language. It also has some fundamental methods to perform operations over the data.

In case of fundamental datatypes, the only concern is the type and nature of the data. There is no issue of time complexity because we deal with the concrete implementation of the programming language. Some common fundamental datatypes include int, char, float, void, etc.

What are Derived Datatypes?

Derived Datatypes are composed of fundamental datatypes; they are derived from the fundamental data types. Therefore, they have some additional characteristics and properties other than that of fundamental data types.

There is an issue of time complexity in the case of derived data types because they deal with manipulation and execution of logic over data that it stores. Derived data types are defined by the user because the programming language does not have built-in definition of the derived data types.

Programmers can modify or redefine the derived datatypes. Some common examples of derived datatypes include arrays, structures, pointers, etc.

Difference between Fundamental Data Types and Derived Data Types

The following table highlights the important differences between fundamental datatypes and derived datatypes −

S.No.

Fundamental Datatypes

Derived Datatypes

1.

Fundamental datatypes are also known as primitive datatypes.

Derived datatypes are composed of fundamental datatypes.

2.

Some fundamental datatypes include int, char, float, void, etc.

Derived datatypes include arrays, structures, pointers, etc.

3.

Integer or Character datatypes are classified as int, char, signed int, signed char, unsigned int, unsigned char.

Pointers are used to store address of some other variables.

4.

Integers are used to store integer type data, not the floating point number.

Arrays are used to store homogeneous data.

5.

Floats are used to store decimal numbers. The variations include float, double, long double.

Structures are group of some primitive datatypes like int, float, double, etc.

6.

Voids is used where no return values are specified.

Unions are like structures, but all the members of a union share the same memory location.

Conclusion

To conclude, fundamental datatypes are those which have their own fundamental characteristics and properties along with some fundamental methods to perform operations over them, whereas derived datatypes are those which are derived from fundamental data types and have some additional or modified properties other than that of the fundamental data types.

Updated on: 11-Jan-2023

2K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements