Sunday, 24 July 2011

PROGRAM IN C++ to find the string length without using inbuilt functions

Do you like this post?
#include
#include
void main()
{
char a[30];
int count=1,i;
clrscr();
cout<<"Enter the string : "; cin>>a
for(i=0;a[i]!=NULL;i++)
{
count++;
}
cout<<"The length of the string is : "< getch();
}

No comments:

Post a Comment