program to find String Length using Pointers.

#include<stdio.h> #include<conio.h>   mystrlen(char * s); main() { char arr[ ] = “Degree Students”; int l 1...



#include<stdio.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);
}

Related

C Programs 401056353765315125

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item