What is the value of sum after the code segment is executed?

Answer:
C: 16
Explanation:
num1 < num2 is false since 6 < 4 is false.
Else, num3 = num2, which means both num3 and num2 have the value 4.
Then, it is checked if num2 >= num3. This is true because num2 (4) and num3 (4) have the same value. Therefore, num1 = num2 + num3, meaning that num1 is 4 + 4 = 8.
So, after all if statements, we have:
num1 = 8
num2 = 4
num3 = 4
sum is equal to num1 + num2 + num3 which is 8 + 4 + 4 = 16.
Answer:
16
Explanation:
Following the code segment:
num1 = 6
num2 = 4
num3 = 10
IF num1 < num2 (which is FALSE as 6 > 4) THEN....ELSE num3 = num2 = 4
IF num2 >= num3 (which is TRUSE as 4 = 4) THEN num1 = num2 + num4 = 4 + 4 = 8
sum = num1 + num2 + num3 = 4 + 4 + 8 = 16