Usually, line will not include more than one \n. In case user presses the Enter key twice, the first line will include only the first Enter. Second Enter must be captured either with additional line or some totally different way, like getc().