Home > Back-end >  C language to write programs that can run compilation, but was unable to display the results on the
C language to write programs that can run compilation, but was unable to display the results on the

Time:11-10


Using c language to write a simple arithmetic calculation program, through the compiler to run, but is not shown on the screen as a result, still hope your bosses to give directions,

CodePudding user response:

X is not initialized, in addition, the EOF the Linux use CTRL + d, under Windows with CTRL + z try
EOF, the original poster is the lack of input or lack of '\ n' building Lord,

Suggested that the building Lord EOF to '\ n' try ~

CodePudding user response:

Thank you! The initialization and EOF to x '\ n' output, after
But I don't really understand why the lack of EOF input and C programming language is the book about EOF getchar function return a special value when no input, while reading to the text flow in the end, there is no next character, getchar function should not returns EOF, why manually enter EOF as the terminator?
  • Related