MIPI_BaseC_WebinarFRTK/09_Lecture09/03_strlen find_p16.c

17 lines
239 B
C
Raw Normal View History

2024-11-13 09:22:28 +03:00
#include <stdio.h>
int my_strlen(const char *src)
{
int len=0;
while (*src++)//*src++!=0
len++;
return len;
}
int main(int argc, char **argv)
{
char* str={"Hello!"};
printf("%d\n",my_strlen(str));
return 0;
}