Similar questions 5 more →
Scope, Lifetime & Storage Classes

Answer & solution
Official answer: 230
1. There are three distinct variables named x: global x, main’s automatic x, and f2’s persistent static x; f1 additionally creates its own automatic x on entry. Name lookup selects the nearest declaration, so f3 alone modifies the global. The two f2 returns may exchange evaluation order, but their sum stays 103.
2. Main’s local x starts 1. f1 returns 26 from its own automatic x; the two f2 calls return 51 and 52 from one static x in either order; f3 multiplies global 10 by 10 and returns 100. Sum1+26+51+52+100=230. Function executions are indeterminately sequenced, so unspecified operand order does not change the sum or cause overlapping unsequenced increments.