WAP in C To Find Out The Length Of The Given String Without Using the Library function.
#include<stdio.h>
#include<conio.h> #include<string.h> void main() { char str[50]; int len; clrscr(); printf("\nenter a string:"); gets(str); for (len=0;str[len]!=NULL;len++); printf("\nthe length of the string is %d",len); getch(); } |