If a character is expected, but an end of file occurs, then failbit is set. If a character is started with a single quote, and end of file occurs before the character within the quotes can be read, or if a closing quote is not found directly after the character, then failbit will be set. Depending on the context of when the character is being read, setting failbit may or may not cause a runtime error to be thrown.