Skip to content

Count a character · ⁨统计某个字符⁩

English

Count a character

Return how many times a given character appears in a C-string. Loop over the characters until the null terminator, adding 1 each time the current character matches target.

中文

统计某个字符

返回某个字符在 C 字符串中出现的次数。遍历字符直到空字符为止,每当当前字符与 target 相同时就加 1。

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩