To enter an EOF, use:
- ^Z (CtrlZ) in Windows
- ^D on Unix-like systems
Related Contents:
- `getchar()` gives the same output as the input string
- Why Ctrl-Z does not trigger EOF?
- Why do I need to type Ctrl-D twice to mark end-of-file?
- I’m trying to understand getchar() != EOF
- Why is “while ( !feof (file) )” always wrong?
- How to avoid pressing Enter with getchar() for reading a single character only?
- What is the equivalent to getch() & getche() in Linux?
- Why doesn’t getchar() wait for me to press enter after scanf()?
- What are the applications of the ## preprocessor operator and gotchas to consider?
- What is EOF in the C programming language?
- Alternative (K&R) C syntax for function declaration versus prototypes
- End of File (EOF) in C
- Why is “while( !feof(file) )” always wrong?
- Signal EOF in mac osx terminal
- How to use EOF to run through a text file in C?
- setvbuf not able to make stdin unbuffered
- EOF in Windows command prompt doesn’t terminate input stream
- int c = getchar()?
- Representing EOF in C code?
- How to clear stdin before getting new input?
- getchar does not stop when using scanf
- fgetc, checking EOF
- Comparing unsigned char and EOF
- Using getchar() in a while loop
- Removing trailing newline character from fgets() input
- The most efficient way to implement an integer based power function pow(int, int)
- I am not able to flush stdin. How can I flush stdin in C?
- How to allocate aligned memory only using the standard library?
- Why cast an unused function parameter value to void?
- Passing multidimensional arrays as function arguments in C
- Reading in double values with scanf in c
- Understanding container_of macro in the Linux kernel
- Why can’t I cast a function pointer to (void *)?
- What’s missing/sub-optimal in this memcpy implementation?
- Using strtok in c
- Is fgets() returning NULL with a short buffer compliant?
- Drawing a character in VGA memory with GNU C inline assembly
- Is a Recursive-Iterative Method Better than a Purely Iterative Method to find out if a number is prime?
- Logical Operators in C
- Precedence of && over || [duplicate]
- Find n primes after a given prime number, without using any function that checks for primality
- Why does gdb evaluate sqrt(3) to 0?
- Using sizeof() on malloc’d memory [duplicate]
- How can I optimize these loops (with compiler optimization disabled)?
- How to redirect the output back to the screen after freopen(“out.txt”, “a”, stdout)
- Strange warning in a C function const multidimensional-array argument
- Are “malloc(sizeof(struct a *))” and “malloc(sizeof(struct a))” the same?
- What happens if I try to access memory beyond a malloc()’d region?
- size of array in c
- Debugging child process after fork (follow-fork-mode child configured)