橘子味的心
标题:C库函数 strlen()

C库函数 strlen()

#include <stdio.h>

#include <string.h>



int main () {

   char str[50];

   int len;



   strcpy(str, "This is codingdict.com");



   len = strlen(str);

   printf("Length of |%s| is |%d|\n", str, len);



   return(0);

}

目录

分类