Practice ยท 1 of 4
Static Counter
Implement int next_id(void) returning 1 on the first call, 2 on the second, 3 on the third โ using a static local (no globals).
Difficulty: beginner
Press Submit to check your solution.
Back to lesson: Practice: Scope & Storage