I\'m writing a program which is supposed to read two strings that can contain line breaks and various other characters. Therefore, I\'m using EOF (Ctrl-Z or Ctrl-D) to end t
EOF isn't a character - it's a special value that the input functions return to indicate a condition, that the "end of file" on that input stream has been reached. As Martin v. Löwis says, once that "end of file" condition occurs, it means that no more input will be available on that stream.
The confusion arises because:
EOF value is one of the values that can be returned by the getchar() family of functions.You will need to use an actual character value to separate the inputs - the ASCII nul character '\0' might be a good choice, if that can't appear as a valid value within the inputs themselves.