Programming - Data types and data structures.
Data Types Programs need to use data for calculations, comparisons, and for output to various devices. The best programs will allways use the most appropriate data types to make the most effective use of memory and to ensure that only the correct types of data are allowed to be input. A variable can be declared to have a data type, including: = character – allows any single letter or number = string – allows any combination of letters, numbers and spaces = integer – for whole numbers = real – for numbers with whole parts and fractional parts = Boolean – can only hold true or false Data structures Programs allow the use of data structures with variables including records and simple arrays. They are defined below: - A record, data structure contains fields to store information In a similar way to a database table. - An array of data structure is a variable with many parts, in simp...