#include
#include
#include
void main()
{
clrscr();
int slength;
char x[81]; //Allowing the user to input a maximum of 80 characters.
cout << "Enter the string : " << endl;
cin>>x;
slength=strlen(x);
cout << "The length of the string " << x << " is " << slength << "." << endl;
getch();
}
Sunday, September 5, 2010
Program to enter a string and find its length
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment