string len()function find length:
#include<conio.h>
void displaylen(char length[]);
void main()
{
char name[20];
clrscr();
printf("Enter Your Name :- ");
gets(name);
displaylen(name);
getch();
}
void displaylen(char length[])
{
int len;
len=strlen(length);
printf("length is %d",len);
}
Output:
EmoticonEmoticon