Definition
Data Type is a type of data. It mentions which type of data is going to be stored into the memory.
Explanation
Data type is primary for a variable declaration. Before declaring a variable, you need to mention the data type of a variable. Variable declaration is allocating memory for storing the data in the system but the data type is indicating which type of data store is to be stored into the memory. There are different types of data types in the programming language. It is common for each programming language.
Integer is main type of data type which mentions the integer (numeric) values like 1,2,3,4,5, 150…. etc.
Character is another type of data types, which mentions characters like ‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘A’, ‘C’, ‘D’…. etc. In character, it should be mentioned in the single quotes, while storing the character into a variable.
String is a collection of characters. It is called a string. String is mentioning things like “Hard Work”, “Confident”, or “Success. The string should be mentioned in double quotes, while storing the string into a variable.
Float is a numeric character with decimal values, for example, 100.10, 1.1 ,50.50 …. etc.
Each data type has a different range of storage capacity.