#include<stdio.h>
int str_len(char * name)
{
if(*name != '\0')
{
return 1+ str_len(name+1);
}else
{
return 0;
}
}
int main()
{
char name[] = "pipi";
int res = str_len(name);
printf("%d \n",res);
return 0;
}
#include<stdio.h>
int str_len(char * name)
{
if(*name != '\0')
{
return 1+ str_len(name+1);
}else
{
return 0;
}
}
int main()
{
char name[] = "pipi";
int res = str_len(name);
printf("%d \n",res);
return 0;
}