Why while input from user information I must use getchar before using fgets

前端 未结 0 1636
情深已故
情深已故 2020-12-14 01:54

When I try to acquire input from the user, I require using fgets() right after getchar as described here:

while (getchar() != \'\\n\'); //Check\'s if we enter         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题