Posts

Showing posts from March, 2017

What are data types?

"A data type is a classification of the type of data that a variable or object can hold in computer programming". It is a classification that specifies which type of value a variable has and what type of mathematical, relational or logical operations can be applied to it without causing an error. The data types are basically two types:- • Primitive data types • Non-Primitive data types The term "data type" and "primitive data type" are often used interchangeably. 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. Programmers can use these data types when creating variables in their programs. 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 loca