Use of the strlen string in C++

#include"iostream.h"
#include"conio.h"
#include"string.h"
void main()
{
clrscr();
char str[5];
int length;
cout<<"enter the string:";
cin>>str;
length=strlen(str);
cout<<"the length of the string is:";
cout<<" "<
getch();
}

No comments:

Post a Comment