📜  c clear buffer - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:36.058000             🧑  作者: Mango

代码示例2
void clearBuffer() {
    char c;
    do {
        c = getchar();
    } while (c != '\n' && c != EOF);
}