Thursday, 20 September 2012

Function to find string length

Function to find string length

int string_length(char *s)
{
   int c = 0;
 
   while(*(s+c))
      c++;
 
   return c;
}

No comments:

Post a Comment