Home > Back-end > While (the scanf (" % s ", p)! Why can't=(EOF) cycle end?
While (the scanf (" % s ", p)! Why can't=(EOF) cycle end?
Time:10-24
P is a pointer variable, after running the program input more groups of data with the blank space disconnected, but end of loop program has an infinite loop, is this why?
CodePudding user response:
Use Ctrl + D (Linux) or Ctrl + Z (Windows) input end
CodePudding user response:
EOF marks end of file, the standard input to input EOF combined through input keyboard key, CTRL + d (Linux) or CTRL + z (Windows)
CodePudding user response:
The standard input how to judge whether the data end?