Data Structure Differences

Difference Between Primitive and Non-Primitive Data Types

data types

Primitive data type: In simple terms “data type” and “primitive data type” are simply known and used as interchangeable variables. Primitive data types are predefined types of data, which are supported by the programming language. For example, integer, character, and string are all primitive data types.

Non-primitive data type: Non-primitive data types are not defined by the programming language, but are instead created by the programmer. They are sometimes called “reference variables,” or “object references,” since they reference a memory location, which stores the data

[button color=”red” size=”big” link=”″ icon=”” target=”true” nofollow=”true”]Don’t miss: .COM for just $0.98![/button]

Read More: Binary Trees and Different Types

Primitive Data Type,

  • A primitive data type is one that fits the base architecture of the underlying computer such as int, float, and pointer, and all of the variations, thereof such as char short long unsigned float double and etc, are a primitive data type.
  • Primitive data are only single values, they have not special capabilities.
  • The examples of Primitive data types are given byte, short, int, long, float, double, char etc.
  • The integer reals, logic data character data pointer, and reference are primitive data structures data structure that normally is directly operated upon by machine-level instructions are known as the primitive structure and data type.

Non- Primitive Data Type,

  • A non-primitive data type is something else such as an array structure or class is known as the non-primitive data type.
  • The data type that is derived from primary data types is known as a non-primitive data type.
  • The non-primitive data types are used to store the group of values.
  • Examples of the non-primitive data types are Array, structure, union, link list, stacks, queue etc…


About Author provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

Difference Between Microprocessor and Microcontroller

Difference Between Microprocessor and Microcontroller

  • July 18, 2019
What is Microprocessor? A microprocessor is an electronic component that is used by a computer to do its work. It is a
Difference Between Array and Union in C
C Programming C++ Programming Differences

Difference Between Array and Union in C

  • July 21, 2019
What is an Array? An array is a collection of data items, all of the same types, accessed using a common name.