What is a user-defined data type?
A user-defined data type is a data type that derived from an existing data type
Name both of the user-defined data types
2. Composite user-defined data types
Name the two non-composite user-defined data types
2. Pointer
Name the two composite user-defined data types
2. Set
Define ‘enumerated data type’
A list of possible data values
Define ‘pointer data type’
A pointer data type is used to reference a memory location
Define ‘record data type’
A data type that contains a fixed number of components, which can be of different types
Define ‘set data type’
A set data type allows a program to create sets and to apply the mathematical operations defined in set theory
What are the operations in set theory?
Define ‘Objects and classes’
An object is an instance of a class; the class specifies how instances are created and how they behave
What is the advantage of a user-defined data type to an in-built one?
User-defined data types are less error-prone and makes a program easier to understand
What is the advantage of using a record data type?
It allows the programmer to collect together values with different data types when these form a coherent
whole
What are the two defined file types?
2. Binary file
What is a text file?
A text file stores data in the form of alphabets, digits and other special symbols by storing their ASCII values
What is a binary file?
A file designed for storing data to be used by a computer program, it stores as a sequence or a collection of bytes
What is a serial file?
A serial file contains records which have no defined order. A typical use of a serial file would
be for a bank to record transactions involving customer accounts
What is a sequential file?
A sequential file has records that are ordered, it is typically used to store data for long periods of time
What is a direct-access file?
Direct-access files are sometimes referred to as ‘random-access’ files, in them, the position of a record is calculated using an algorithm
What is a real number?
A real number is one with a fractional part
What is floating point representation?
A representation of real numbers that stores a value for the mantissa and a value for the exponent
What is fixed point representation?
Fixed point representation is when an overall number of bits is chosen with a defined number of bits for the whole number part and the remainder for the fractional part
What is a mantissa?
A fixed-point real number in two’s complement form and an understood position for the binary point
What is the exponent?
A signed integer in two’s complement representation