/FSM

Finite State Machine

Primary LanguageC

FSM

Finite State Machine

I am Preparing for a coding challenge as part of an interview process. One of the questions will revolve around implementing an FSM in C, and I am trying to create a template that could help me out.

I understand that an FSM's NEW state is determined by its current state and input. Therefore I created a code that simulates an FSM with two states and two inputs to keep it simple. Is there a better way of implementing this kind of finite state machine?