11-20-2018 04:18 AM
To understand recursion, first you must understand recursion!
/Y
02-28-2022 07:23 AM
It's funny how once you've worked out the answer, it is plain obvious how to eliminate unsuitable answers. Reading carefully, it asks which of the following recursive subVIs will return the correct value for Result?
A and B can be scrapped out right away because they do not operate on the Result indicator (end value is 0). In addition, A does not have a mechanism to stop the recursion. B is a tricky answer because Expression out does contain the correct result at the end, but result is 0. C can also be scrapped out because it does not provide the means to stop the recursion. Leaving D as the correct answer.
Unfortunately under the crunch of time I would likely miss such indications and spend a good amount of time visualizing the execution of the most likely answers.