Monday, 23 December 2013


/*TO CALCULATE THE LENGTH OF THE STRING*/

INPUT

#include<conio.h>
#include<stdio.h>
int main()
{
char str[40];
int i;
printf("\nEnter the string to calculate its string");
gets(str);
for(i=0;str[i]!='\0';i++)
i=i+1;
printf("\nThe length of entered string is: %d",i);
getch();
return 0;
}

OUTPUT



Please give your comment , so I could improve this blog.

No comments:

Post a Comment