strlen Function

  • It returns the string length .
  • The null terminator is not counted .


  • Syntax:

      size_t strlen(const char *str);

    Example:

    #include <string.h>
    
    #include <stdio.h> 
    
    
    
    int main()
    
    {
    
       printf("%d", strlen("hello"));
    
       return 0;
    
    }
    Back