Here we find the length of the given string without any use of the predefined library.
Example-
string is "r4r_string"
Length is : 10
program-
#include< iostream>
int main()
{
char ch[20];
int len=0,i=0;
cout<<"Enter string"<
while(1)
{
if(ch[i++]!='')
len++;
else
break;
}
cout<<"Length of the string is: "<
Enter string
Mystring
Length of the string is: 8