Differences Technology

Difference Between Primitive and Non-Primitive 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=”https://namecheap.pxf.io/c/2001466/1291734/5618″ 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…

Tuts

About Author

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

You may also like

waterfall model
Technology

Advantages and Disadvantages of Waterfall Model

Waterfall Model is one of the major and crucial system development models which was developed for System development. This is
Cloud Computing
Technology

What is Cloud Computing? Benefits and Characteristics

Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management