include
include
main()
{
char s1[20];
int len;
printf(“\nEnter any string: “);
gets(s1);
len = strlen(s1);
printf(“\nLength of string: %d”, len);
getch();
}
OUTPUT:
Enter any string: programming9.com
Length of string: 16
main()
{
char s1[20];
int len;
printf(“\nEnter any string: “);
gets(s1);
len = strlen(s1);
printf(“\nLength of string: %d”, len);
getch();
}
OUTPUT:
Enter any string: programming9.com
Length of string: 16