Skip to content

String length

String length

A C-string is a row of characters that ends with a hidden null terminator. Return how many characters come before it — basically writing strlen yourself. Walk an index forward until you reach the terminator, counting as you go.

Log in or create account

IGCSE & A-Level