You are simulating a system boot-up sequence using function pointers.
There are 4 states:
void state_init() { printf("Init"); } void state_load() { printf("Load"); } void state_execute() { printf("Execute"); } void state_exit() { printf("Exit"); }
Your Task
Constraints
Example-1
Input: 0 Output: Init Load Execute
Example-2
Input: 2 Output: Execute Exit Init
Example-3
Input: 3 Output: Exit Init Load
Test Cases
Test Results
Input
0
Expected Output
Init Load Execute