#include <stdio.h>
int MyStrlen(const char *si);
int main() {
char str[] = "a";
char str1[] = "HELLO";
char str2[] = "";
printf("Length: %d \n", MyStrlen(str));
printf("Length: %d \n", MyStrlen(str1));
printf("Length: %d \n", MyStrlen(str2));
return 0;
}
int MyStrlen(const char *si) {
int input;
for(input = 0; *si; si++)
input++;
return input;
}
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
Adak 419 Nearly a Posting Virtuoso
potato4610 0 Newbie Poster
potato4610 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.