logo

Pearson Edexcel GCSE (9-1) Computer Science practice

A programmer needs to store information about multiple employees, where each employee has a name (text), an ID number (integer), and a salary (decimal). Which data structure would be most appropriate to represent a single employee?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Algorithms

Exam-style question

Try this first

A programmer needs to store information about multiple employees, where each employee has a name (text), an ID number (integer), and a salary (decimal). Which data structure would be most appropriate to represent a single employee?.

  1. A.A one-dimensional array
  2. B.A two-dimensional array
  3. C.A string
  4. D.A record

Answer and explanation

Concise answer

A record

Why this is correct

A record (or structure) is ideal for grouping related data items of potentially different data types, such as an employee's name (string), ID (integer), and salary (decimal). Arrays store items of the same data type. Strings store character sequences.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

Flashcard 1 of 6

Press Space to flip, arrows to move

Related practice questions