C program to find out the length of a given string without using the library function strlen().
C Program
#include <stdio.h>
#include <conio.h>
void main()
{
char str[50];
int len;
clrscr();
printf("\nENTER A STRING: ");
gets(str);
for(len=0;str[len]!=NULL;len++);
printf("\nTHE LENGTH OF THE STRING IS %d",len);
getch();
}