#include < stdio.h >
#include<conio.h>
#include<conio.h>
#include < string.h >
int main()
{
char a[100];
int length;
printf("Enter a string to calculate it's length\n");
gets(a);
{
char a[100];
int length;
printf("Enter a string to calculate it's length\n");
gets(a);
length = strlen(a);
//strlen(string) : function gives length of string
//strlen(string) : function gives length of string
printf("Length of entered string is = %d\n",length);
getch();
}
No comments:
Post a Comment