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);

}

Labels