Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests - Download the BYJU'S Exam Prep App for free GATE/ESE preparation videos & tests -

Difference Between Fundamental Data Types and Derived Data Types

Both of these are Data Types used in computer programming, but there is a fundamental difference between fundamental data types and derived data types. In this article, we will discuss the same in a tabular form. But let us first know a bit more about data types.

In the case of computer programming, a data type refers to a classification that specifies the given interpreter or compiler which type of data must be used. There are typically two major types of data:

  • Derived Data Type
  • Fundamental/ Primitive Data Type

What are Fundamental Data Types?

All the variables present in C++ and C have associated data types. Every data type needs a different amount of memory. Also, each of them has specific operations that one can perform over them.

What are Derived Data Types?

This type of data type is generally used by a user itself, for example, a structure or a class in the C++ language. The Derived Data Types include Pointers, Enumeration, Union, Class, Structures, Arrays, etc. These are just a few examples.

Difference Between Fundamental Data Types and Derived Data Types

Here are the differences present between Fundamental Data Types and Derived Data Types:

Parameters Fundamental Data Types Derived Data Types
Type of Complication A fundamental data type is very basic. It is also known as a primitive data type. A derived data type is basically an aggregation of the fundamental data type.
Examples Void, Float, Integer, and Character are fundamental data types. Structures, Unions, Arrays, and Pointers are the derived data types.
Specification of Elements It uses Character in the form of char, Unsigned char, Signed char, etc., for the characters present in the Fundamental Data Type. The Derived Data Types make use of pointers for storing the address of the available variables.
Storage of Data It uses integers for the integers with no decimal digits. We can classify it as unsigned and signed. It is further classified as the int, long int, and short int. It makes use of arrays to contain a similar data type.
Use We use void when we don’t require the return value. It is just like a structure, but the difference is that all the members present in a union share the very same location of memory.
Grouping of Values We use floats for the decimal numbers. The classification occurs as double, float, and long double. We use a structure for grouping all the different types of available items into one single type.

Keep learning and stay tuned to get the latest updates on GATE Exam along with GATE Eligibility Criteria, GATE 2023, GATE Admit Card, GATE Application Form, GATE Syllabus, GATE Cut off, GATE Previous Year Question Paper, and more.

Also Explore,

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*