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ストリング内で何回出現するかを返します。nul終端文字まで文字をループさせ、現在の文字が target と一致したたびに1加算します。

Log in or create account · ⁨ログインまたはアカウント作成⁩

IGCSE, A-Level & AP