Write A Program to find length of a string with out using string handling functions
#include<stdio.h> #include<conio.h> int len ( char s [ ]); void main ( ) { char s [20]; int l; clrscr(); print...
https://www.computersprofessor.com/2016/06/write-program-to-find-length-of-string.html
#include<stdio.h>
#include<conio.h>
int len ( char s [ ]);
void main ( )
{
char s [20];
int l;
clrscr();
printf (“enter a string”);
gets ( s);
l = len ( s);
printf ( “\n length is %d”,l);
getch();
}
int len ( char s[])
{
int c = o, i;
for ( i =0; s[i]!='\0'; i++)
{
c++;
}
return ( c);
}
