QuestionQ79

VerifiedStatic and Dynamic Analysis

Given the following pseudocode:

Question Image

If control-flow analysis is applied to the pseudocode, which of the following outcomes is MOST likely?

Explanation

yearly is incremented by monthly exactly 12 times, making it equal to monthly * 12, which is also the value assigned to salary. The condition salary = yearly is therefore always true, so the ELSE statement at line 15 cannot execute. The tax comparison evaluates equal values, so line 19 is reachable.

Community Discussion

No comments yet. Be the first to start the discussion!