asked 89.4k 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

asked
User Jvdneste
by
7.9k 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.

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.