logo

Question detail

Which example best demonstrates file path parameterisation?

Try the question, check the answer, then read the explanation to understand the curriculum point.

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.

Model answer

What a good answer should say

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

Explanation

Why this works

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

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.