How you count lentgh of string without using strlen?

1 answer

Answer

1175641

2026-04-17 20:40

+ Follow

Basically in C language string is NULL (0x00) byte ending char array. So in order to find out the length of the string you need to count all elements in array until you reach NULL. But that is what strlen does.

There are two links with information about strlen implementation and null-terminated strings.

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.