write a c program to find the length of a string,write a c program to find the length of given string,write a c program to find the length of a given string
Write a c program to find the length of a string
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char s[20];
int l;
clrscr();
printf("Enter the string: ");
gets(s);
l=strlen(s);
printf("The length of the string is %d",l);
getch();
}
Output:
Enter the string: Hanumanth Ladwa
No comments: