#include<stdio.h>
#include<conio.h>
int len(char []);
int main()
{
char s1[25];
int i;
printf("enter first string");
scanf("%s",s1);
i=len(s1);
printf("\n the length of string is %d",i);
}
int len(char s1[])
{
int i=0;
while(s1[i]!='\0')
{
i++;
}
return i;
}
#include<conio.h>
int len(char []);
int main()
{
char s1[25];
int i;
printf("enter first string");
scanf("%s",s1);
i=len(s1);
printf("\n the length of string is %d",i);
}
int len(char s1[])
{
int i=0;
while(s1[i]!='\0')
{
i++;
}
return i;
}
No comments:
Post a Comment