Records | |||||||||||||||||||
A record consists of a number of fields. A field consists of a single data item and these may be of different types. For example a record may consist of three fields :
When used in programs, the name and type of each field will need to be declared.
|
|||||||||||||||||||
Example In high level languages we need to set up a record type (PupilType) which defines the fields and field types...... and then declare a variable (Pupil) to be of that type:
Values for each field can then be assigned...
|
|||||||||||||||||||
Sample A Level Question
|
|||||||||||||||||||