Saturday, July 27, 2019

string len()function find length

string len()function find length:

string len()function find length


#include<stdio.h>
#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