Function and usage of strlen function in C language

  prototype:
 

 extern int strlen(char *s);

  usage:
  

#include <string.h>

  Function: Calculate the (unsigned int type) length of the string s

  Description: Returns the length of s, excluding the terminator NULL.

  Example:
  

#include <syslib.h>

  #include <string.h>

  main()

  {

  char *s="Golden Global View";

  clrscr();

  printf("%s has %d chars",s,strlen(s));

  getchar();

  return 0;

  }

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326398485&siteId=291194637