fgets() does not work as I expect it to

后端 未结 3 1616
逝去的感伤
逝去的感伤 2021-01-19 17:17

Can anyone tell me why this code does not work? When i run, it just prints out \"Enter info about trail 1\" and without any input, skips to another step.

#in         


        
3条回答
  •  广开言路
    2021-01-19 18:02

    1) Add this line after scanf() : getchar()

    2) Change fgets (...) 4 to 19.

    The program will work.

提交回复
热议问题