diff --git a/str_len b/str_len new file mode 100755 index 0000000..cbf0897 Binary files /dev/null and b/str_len differ diff --git a/str_len.c b/str_len.c new file mode 100644 index 0000000..99ecd37 --- /dev/null +++ b/str_len.c @@ -0,0 +1,15 @@ +#include +#include +int mystrlen(const char *s); +int main(int argc, char **argv) +{ + printf("Print you string\n"); + char s[100]; scanf("%s", s); + printf("You printed:%s\n", s); + printf("Your str has:%d chars\n", mystrlen(s)); + return 0; +} +int mystrlen(const char *s) +{ + return strlen(s); +}