C++ Program to Find String Length

C++ Program to Find String Length 1

Write a C++ Program to Find String Length with an example. In C++, there is a length function to find the string length. #include<iostream> #include<string> using namespace std; int main() { string txt; cout << “\nPlease Enter the String to find Length = “; getline(cin, txt); int len = txt.length(); cout<< “\nThe Length of ‘” … Read more