89.3k views
1 vote
A stub function is:__________.

A) A short function
B) A function that has been unit tested
C) A function that acts as a placeholder and returns a simple value so another function can be tested
D) A function that is broken down into smaller steps through step-wise refinement

User Jvdneste
by
4.5k points

1 Answer

6 votes

Answer: c. A function that acts as a placeholder and returns a simple value so another function can be tested.

Explanation:

A stub simply means a function which has an expected signature but has an incomplete implementation. It is put in place in order for codes to be tested before the functions are fully written.

A stub is a function that acts as a placeholder and returns a simple value so another function can be tested. Therefore, the correct option is C.

User Sredny M Casanova
by
4.8k points