Thursday, December 2, 2010

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

}

No comments:

Post a Comment