C Program to find Length of a Given String

C – Length of a Given String C Language Program Code

#include
#include
#include
void main()
{
char a;
int z;
clrscr();
printf(“ntEnter a string:”);
scanf(“%s”,&a);
z=strlen(&a);
printf(“ntLength of given string is:%d”,z);
getch();
}

Add Comment