program to find String Length using Pointers.
#include<stdio.h> #include<conio.h> mystrlen(char * s); main() { char arr[ ] = “Degree Students”; int l 1...
https://www.computersprofessor.com/2016/06/program-to-find-string-length-using.html
#include<stdio.h>
#include<conio.h>
#include<conio.h>
mystrlen(char *s);
main()
{
char arr[ ] = “Degree Students”;
int l1, l2;
l1= mystrlen(arr);
l2 = mystrlen(“college”);
printf(“\n string %s length = %d”, arr, l1);
printf(“\n string %s length = %d”, “college”, l2);
getch();
}
mystrlen(char *s)
{
int lenght =0;
while (*s!=’\0’)
{
length ++;
s++;
}
return(length);
}