Question: C program help 2. For the following code: #include stdafx.h struct State char out struct State *next[2]; b; typedef struct State States; #define STe &FSM[8]
2. For the following code: #include "stdafx.h" struct State char out struct State *next[2]; b; typedef struct State States; #define STe &FSM[8] #define ST1 &FSM[1] #define ST2 &FSM[2] States FSM[3] { {"L', {STe, ST1)), {'1', {STe, sT2)), {ST1, = {.2', ST2))); int main() States "ptr &FSM[e]; int in; while (1) printf("cIn", ptr->out); printf("Enter a e or 1 to operate this machine: "); scanf s("Xd", &in); ptr ptr->next[in]; return e; Draw the finite state machine diagram for this code. a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
