Two integer-halving loops
Control Flow & Loop Tracing

Answer & solution
Official answer: B
Method
The first loop sees i=2^40,2^39,…,2 before stopping at i=1, so its body runs 40 times. The second loop then uses integer division: 40→20→10→5→2→1. It executes for the first five of these values, not for the final 1. The two loops are consecutive, not nested: multiplying their iteration counts would not describe the return value. The exponent in 2^40 is essential and can be lost in text extraction.
Solution
The first loop halves i until 1, performing 40 iterations, hence j=40. The second loop has j values 40, 20, 10, 5, 2 before stopping at 1, so sum=5, B.

