STRING ALGORITHMS
Print this page
ALGORITHM FOR StringLength
We assume that the given string STR is terminated by special symbol '\o'.
length = 0, i=0; //Indentity starts from '0'.
while STR[i] != '\0' //In C '\o' is used as end-of-string markes.
i++;
length=i;
return length
Prev
First
|
Next
|
End