Find String Length
February 18, 2012
/*
Write a program in C to find string length
*/
#include<stdio.h>
#include<string.h>
main()
{
char a[100];
int length;
printf("Enter a string to calculate it's length\n");
gets(a);
length = strlen(a);
printf("Length of entered string is = %d\n",length);
return 0;
}
0 Comments