#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int my_strlen(char* st)
{
if (*st != '\0')
{
return 1 + my_strlen(st + 1);
}
else
return 0;
}
int main()
{
char arr[] = "bit";
int len = my_strlen(arr);
printf("%d\n", len);
return 0;
}
标签:arr,return,递归,int,my,st,字符串,长度,strlen From: https://blog.51cto.com/u_15838933/5798142