标签:
#include <stdio.h>
int my_strlen(char const *p)
{
if(*p== ‘\0‘)
{
return 0;
}
else
{
return 1+my_strlen(p+1);
}
}
int main ()
{
char *p = "bit";
printf("%d\n",my_strlen(p));
return 0;
}
标签:
原文地址:http://blog.csdn.net/sulijuan66/article/details/45651675