Why is code written inside functions easier to test?
- Functions never contain errors
- The debugger only works inside functions
- A function can be called with test inputs and its return value checked
- Functions run faster than other code
Answer
C) A function can be called with test inputs and its return value checked
Functions isolate a task so it can be tested separately. SLO CS-11-C-07
Computer Science MCQ · More Unit 3: Programming Fundamentals MCQs · Practise