while (getchar () != '\n' );

前端 未结 6 545
囚心锁ツ
囚心锁ツ 2021-01-03 17:08

I have the following for loop, I am prompting the user to enter a 4 digit pin and hit enter. Can someone explain to me what the while loop is really doing because I don\'t f

6条回答
  •  滥情空心
    2021-01-03 18:04

    The while loop is used to check when the user will press enter.Enter is considered as '\n'.

提交回复
热议问题