#include <stdio.h>
void printstring(char arr[]);
int countlength(char arr[]);
int main() {
char name[100];
fgets(name,100,stdin);
printf("length is:%d",countlength(name));
return 0;
}
int countlength(char arr[]){
int count=0;
for(int i=0;arr[i]!= '\0';i++){
count++;
}
return count;
}
void printstring(char arr[]){
for(int i=0;arr[i]!='\0';i++){
printf("%c",arr[i]);
}
printf("\n");
}
To embed this project on your website, copy the following code and paste it into your website's HTML: