In this program, you'll learn to find length of a string.
#include<stdio.h>
void main()
{
char s[20];
int i=0, len=0;
printf("Enter the string\n");
gets(s);
while(s[i] != '\0')
{
len++;
i++;
}
printf("Length of given string = %d", len);
getch();
}
Enter the string
Welcome to 'C'
Length of given string = 14