Program To Find the Length of a String In C++

Ram


To Find The Length OF The String object We Need Use
size(), length() Functions

Here The Both size() And Length() Do Same Thing


#include <iostream>

using namespace std;

int main ()
{
String st = "Iam Cseian"
    cout<<"Length Of String is" <<St.size();

    return 0;
}


OP ::  Length Of String is 10


Post a Comment

0Comments

Post a Comment (0)