Final answer:
The value stored in z is 6.0 because we follow the order of operations and perform the division before the addition.
Step-by-step explanation:
The value stored in z by the end of the code segment is 6.0.
To solve the expression x + y / 2, we need to follow the order of operations (PEMDAS/BODMAS). First, we divide y by 2 to get 3. Then, we add x (which is 3) to the result of the division, giving us a final value of 6.0 for z.
Learn more about Order of Operations