Practice · 1 of 4
Initialization Across Units
CHALLENGE
Difficulty: advanced+25 XP
A file-scope int stage = 1; is already in your editor. Implement int advance(void) (returns the old stage, then increments it) and int current_stage(void). The test program below links as one unit, but your functions model what cross-object globals do: file-scope state lives once, and every caller sees the same object — simulate and confirm.
Press Submit to check your solution.
Back to lesson: Practice: Binary Forensics Drills