Data types: Difference between revisions

From Computer Science Wiki
(Created page with "right|frame|Programming<ref>http://www.flaticon.com/</ref> Data type determines what sort of data is being stored and how it will be used by the prog...")
 
No edit summary
Line 2: Line 2:


Data type determines what sort of data is being stored and how it will be used by the program. In computer science and computer programming, a data type or simply type is an attribute of data which tells the compiler or interpreter how the programmer intends to use the data <ref>https://en.wikipedia.org/wiki/Data_type</ref>.
Data type determines what sort of data is being stored and how it will be used by the program. In computer science and computer programming, a data type or simply type is an attribute of data which tells the compiler or interpreter how the programmer intends to use the data <ref>https://en.wikipedia.org/wiki/Data_type</ref>.
Data types are important in programming languages because they help the compiler or interpreter more efficiently allocate memory.  Data types tells MMU that how much memory requirement it has before the program compiles. Also, the data type defines which operations can safely be performed to create, transform and use the variable in another computation.


Primitive data types are typically types that are built-in or basic to a language implementation.<ref>https://en.wikipedia.org/wiki/Data_type</ref>
Primitive data types are typically types that are built-in or basic to a language implementation.<ref>https://en.wikipedia.org/wiki/Data_type</ref>
== Different types of primitive types ==
Not all languages have the same primitive data types. Please see below for a representative list of types:
* [[Int]]
* [[Boolean]]
* [[String]]
* [[Float]]
* [[Char]]


== References ==
== References ==

Revision as of 05:02, 11 May 2020

Programming[1]

Data type determines what sort of data is being stored and how it will be used by the program. In computer science and computer programming, a data type or simply type is an attribute of data which tells the compiler or interpreter how the programmer intends to use the data [2].

Data types are important in programming languages because they help the compiler or interpreter more efficiently allocate memory. Data types tells MMU that how much memory requirement it has before the program compiles. Also, the data type defines which operations can safely be performed to create, transform and use the variable in another computation.

Primitive data types are typically types that are built-in or basic to a language implementation.[3]

Different types of primitive types[edit]

Not all languages have the same primitive data types. Please see below for a representative list of types:

References[edit]