Skip to content

Count a character

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.

Log in or create account

IGCSE & A-Level