Program to Find the Length of a String
#include <iostream>
using namespace std;
int main() {
string str = "C++ Programming";
// you can also use str.length()
cout << "String Length = " << str.size();
return 0;
}
Output
String Length = 15
