Function is best defined as which of the following?
- A. A technique where a function calls itself to solve smaller instances of a problem.
- B. A reusable block of code that performs a specific task and can be called with different inputs. ✓
- C. The region of a program where a declared variable can be accessed.
- D. A variable that stores the memory address of another variable.
Correct answer
B. A reusable block of code that performs a specific task and can be called with different inputs.
Explanation
Function refers to a reusable block of code that performs a specific task and can be called with different inputs.