用scanf清空缓冲区 对比fflush

fflush会将缓冲数据打印到屏幕或者输出磁盘,scanf将丢弃。

如上图。

原文地址:https://www.cnblogs.com/dosu/p/12052105.html