Question: Consider the following program fragment: Note that no matter which leg of the if is executed, the print statement cannot be reached. This is quite
Consider the following program fragment:
Note that no matter which leg of the if is executed, the print statement cannot be reached. This is quite possibly an error, and certainly deserves a warning message. Explain how the isReachable and terminatesNormally values set during reachability analysis can be used to conclude that the above print statement is unreachable.
while (a) if (b) break else if (c) a update (a) continue else return; print a, b,c)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
