1
0
forked from KIX/lab1_git

func mystr_len code

This commit is contained in:
KIX
2025-10-18 04:27:10 -04:00
parent 02c9041d0e
commit 8367bf941a
2 changed files with 15 additions and 0 deletions

BIN
str_len Executable file

Binary file not shown.

15
str_len.c Normal file
View File

@@ -0,0 +1,15 @@
#include <stdio.h>
#include <string.h>
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);
}