How to do String Length with User Function at C language

C Programlama, Kullanıcı Fonksiyonu ve String Uzunluk

Yeni Başlayanlara – for beginner’s 

#include<stdio.h>

int length(char* word)
{
int x=0;
while(word[x]!='\0'){
x++;
}
return x;
}

int main()
{
char wordx[]="";
scanf("%s",wordx);
int len=length(wordx);
printf("%d\n",len);

printf("%d\n",length("cepte bilisim"));
}