Find the length of a string.

#include <stdio.h>

int main(void)
{
char str[80];
int len;

printf("\nEnter a string : ");
gets(str);

for(len = 0 ; str[len] != '\0' ; len++)

printf("\nLength of the string is %d", len);

return 0;
}

No comments:

Post a Comment

kiss on google ads if you are anonymous because your ip is trackable.thank you.

......from.admin