使用递归:

int strlen(char * str)  
{  
     if(*str)            
          return strlen(str+1)+1;  
     else  
          return 0;  
}
Li Shaocheng. Published under BY-NC-SA
Comments
Write a Comment