Skip to content · ⁨Passer au contenu⁩

Count a character · ⁨Compter un caractère⁩

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.

Français

Compter un caractère

Retournez combien de fois un caractère donné apparaît dans une chaîne C. Bouclez sur les caractères jusqu'au terminateur nul, en ajoutant 1 chaque fois que le caractère actuel correspond à target.

Log in or create account · ⁨Se connecter ou créer un compte⁩

IGCSE, A-Level & AP