A record type CarRecord has the fields Reg : STRING, Seats : INTEGER and Electric : BOOLEAN. An array is declared with DECLARE Garage : ARRAY[1:50] OF CarRecord. Which statement stores 7 seats for the second car?
- Garage is an array, so first choose the element with an index: Garage[2].
- That element is one whole record, so add a dot and the field name: Garage[2].Seats.
- Seats is an INTEGER, so assign the whole number 7 with no quotes.
Answer: Garage[2].Seats ← 7