Question.4
A firmware engineer writes this code for a boot sequence:
void (*states[4])() = {init, load, exec, shutdown}; for (int i = 0; i < 4; i++) { states[i](); }
What firmware design pattern does this implement?
Select Answer
Callback registration — storing functions for later invocation by an event
State machine — cycling through states using a function pointer array
Interrupt vector table — mapping IRQ numbers to handler functions
Observer pattern — notifying multiple subscribers of an event