Scanf with char

时间:2018-04-11 22:57:59

标签: c scanf getchar

为什么没有{ "query": { "filtered": { "filter": { "bool": { "must": [ { "script": { "script": { "params": { "matchValue": "32562" }, "inline": "(Math.abs(matchValue - doc['domCompleteTime'].value) < (matchValue/1000))" } } } ] } } } }, "aggs": { "domParseEnd": { "percentiles": { "field": "domParseEnd", "percents": [50] } } } } 函数错误?为什么getchar没有得到char?

scanf("%c",&slovo);

1 个答案:

答案 0 :(得分:1)

因为scanf忽略了换行符,并且符号保留在输入缓冲区中,直到从缓冲区读取的下一个函数开始。