The data type of a variable is an attribute that tells what kind of data that variable can have.
Data types can be divided into two major categories:
1. Primitive data type (predefined)
2. Non - primitive data type (user defined)
Primitive data type:
It is predefined types of data, which are supported by the programming language. For example, int, char, double, string etc. are all primitive data types.
Non - primitive data type:
They are not defined by the programming language but are instead created by the programmer.