logo

AQA A-Level Computer Science practice

Which example best demonstrates file path parameterisation?

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

At a glance

MCQ

Type

practice

Style

Topic

Marking criteria

Exam-style question

Try this first

Which example best demonstrates file path parameterisation?.

  1. A.Writing a file path directly into several parts of a program.
  2. B.Passing the file path to the relevant code rather than fixing it inside the code.
  3. C.Using a global variable for every value in the program.
  4. D.Replacing meaningful identifiers with shorter names.

Answer and explanation

Concise answer

Passing the file path to the relevant code rather than fixing it inside the code.

Why this is correct

File paths are parameterised when they are supplied to the relevant code as a parameter instead of being fixed within that code.

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

No flashcards are published for this page yet.

Related practice questions