LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CLD-R Exam 1, Question 22

Solved!
Go to solution

To understand recursion, first you must understand recursion!

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 11 of 12
(460 Views)

 

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 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.

 

---
SergioR
0 Kudos
Message 12 of 12
(324 Views)