Complete the code to define the number of states.
enum States { STATE_IDLE, STATE_PROCESS, STATE_DONE, [1] };The enum ends with STATE_COUNT to represent the total number of states.
Complete the code to declare the state transition function pointer type.
typedef void (*StateFunc)([1]);The state functions take no parameters and return void.
Fix the error in the state transition table declaration.
StateFunc state_table[[1]] = { state_idle, state_process, state_done };The array size should be STATE_COUNT to match the enum count.
Fill both blanks to correctly update the current state using the transition table.
current_state = [1]; state_table[[2]]();
Assign next_state to current_state, then call the function for current_state.
Fill all three blanks to define the state transition table with correct function pointers.
StateFunc state_table[STATE_COUNT] = { [1], [2], [3] };The table must list the functions for each state in order.
