Exam-style question
Try this first
Which example best demonstrates file path parameterisation?.
- A.Writing a file path directly into several parts of a program.
- B.Passing the file path to the relevant code rather than fixing it inside the code.
- C.Using a global variable for every value in the program.
- 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.
