184. C Program to Find Length of the Given String.
How does this program work?
- This Program is used to find the length of the given string.
Here is the code
#include <stdio.h>
#include <string.h>
int main()
{
char str[1000];
int i;
printf("Enter the String: \n");
scanf("%s", str);
for (i = 0; str[i] != '\0'; ++i);
printf("Length of given string is %d", i);
return 0;
}