7.5k views
0 votes
What is a fruitful function? Explain with help of programming example?
plz

1 Answer

5 votes
These are the functions that return a value after their completion. A fruitful function must always return a value to where it is called from. A fruitful function can return any type of value may it be string, integer, boolean, etc. It is not necessary for a fruitful function to return the value of one variable, the value to be returned can be an array or a vector. A fruitful function can also return multiple values.
User Kwal
by
6.0k points