Differences between Array and Record

Differences between Array and Record

An array is a data structure that stores a list of values of the same data type. The elements of the array are referenced respectively by an index set. The structure of array is simple than the record structure.

A record is a data structure that stores bits of data of multiple data types in fields. So record can be defined briefly as a collection of related data an item, each of which is called a field or attribute.

The differences between array and record are discussed below.

Array – It is a list of a finite number of homogenous data elements.

  • A data structure that stores a list of values of the same data type.
  • An array can be used to store data of the same data type.
  • Arrays have locations and these are numbered.
  • Every location in an array is of the same data type.
  • Arrays have locations and these are numbered. Every location in an array is of the same data type.

Record – it is the collection of field values of a given entity.

  • A data structure that stores bits of data of multiple data types in fields.
  • A record can be used to store a collection of data of different data types.
  • Records have fields and these are named.
  • Every field in a record can be of different data types.
  • A record has fields and these are named. Every field in a record can be of different data types.

Share This Post