C program to find string length


/* C program to find string length. */

#include"stdio.h"
#include"string.h"
void main()
{
char str1[100];
printf("Enter a string: \n");
scanf("%s", str1);
printf("Length of the given string is: %d\n", strlen(str1));

}

Output:




Comments

Popular Posts