Wednesday, 12 October 2016

To find lenght of a string or word using strlen() function

//to find lenght of a string or word  using strlen() function

#include<stdio.h>
#include<string.h>
int main()
{
char s[20],s1[10];
printf("enter the string:");
gets(s);
int l=strlen(s);
printf("\nThe lenght of the string is =%d",l);

}

No comments:

Post a Comment