Monday, August 14, 2017

String processing in C++

This program will find length of string.

#include <iostream>
using namespace std;

int main()
{
    string myStr = "Hello Students";
    cout << "myStr String Length = " << myStr.length();

    return 0;
}

Output of program

myStr String Length = 14

* * *

No comments:

Post a Comment