Find length of a string using library function

#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
char str[25];
int length;
clrscr();
puts("Enter the String");
gets(str);
length=strlen(str);
printf("Length of Given String is %d", length);
getch();
return 0;
}

0 comments:

Post a Comment