Program in C to demonstrate the use of strlen() function

Write a program in C to demonstrate the use of strlen() function

#include<stdio.h>
#include<string.h>

void main(void)
{
char str[31];
int len;
printf("\nEnter any String");
gets(str);
len=strlen(str);
printf("\nNumber of Character in%s=%d\n",str,len);
}


Post a Comment