KodeGod.com

085. Write a program to print length of a given string in C language

#include<stdio.h>
#include<conio.h>  
main()
{
	int i,len=0;
	char *s;
	clrscr();
	printf("Enter the string....");
	scanf("%s",s);
	for(i=0;s[i]!='\0';i++)
		len++;
	printf("The lenth of the string is...%d",len);
	getch();
}