char character, newLine = 'x';
while (newLine != '\n') {
scanf("%c%c", &character, &newLine);
if (newLine != '\n')
printf("ERROR: enter 1 character\n");
}
For example, if I enter "KITTEN", I want it to analyze only "KI", output 1 error message and wait for the next input. Instead, it analyzes "KI", "TT", "EN" and as the result outputs 3 error messages.