empty buffer c code example
Example: c clear buffer
void clearBuffer() {
char c;
do {
c = getchar();
} while (c != '\n' && c != EOF);
}
void clearBuffer() {
char c;
do {
c = getchar();
} while (c != '\n' && c != EOF);
}