Question: This is in c. Why do we scanf twice first outside loop and then in a loop? When i take out the while loop it

This is in c. Why do we scanf twice first outside loop and then in a loop? When i take out the while loop it crashes. Why is that?
*ASK USER FOR INITIAL STATE*/ char state: initial state: scanf ( "%c" ,&state) while(staten') scanf ( "%" , &state)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
