Write C++ Program to Find the Length of a String.
Source Code:
1
2
3
4
5
6
7
8
9
| #include <iostream>
using namespace std;
int main()
{
string str = "C++ Programming";
// you can also use str.length()
cout << "String Length = " << str.size();
return 0;
}
|
Post a Comment