Apply Now :

Find String Length

Monday, 12 December 2011


// C++ Program => Find String Length
// Calibre IT & Management Institute
// [ Krishna suman ]

#include <iostream.h>
#include <conio.h>
#include <string.h>

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();
}



Share this Article on :

No comments:

Post a Comment