Length of a String in C++

Write a program (WAP) in C++ to calculate length of a string.
Length of a String in C++

Write a program (WAP) in C++ to calculate length of a string.

#include <iostream>
using namespace std;
int main()
{
    string str = "Sarthak Mund S3";
    cout<<"String is : "<<str<<"\n";
    cout << "Length of the String is : " << str.size();
    return 0;
}

Out Put  :-

Length of a String in C++
Must Read :-
  1. Blogger Tutorial
  2. C Programs
  3. C++ Programs
  4. Java Programs
  5. Python Programs
  6. Programming Notes 
  7. Questions & Answers
  8. My Codes : HTML, CSS & JS
  9. All Subject Notes

About the author

Sarthak Mund S3
◕‿◕कर दिखाओ कुछ ऐसा की दुनिआ करना चाहे आपके जैसा◕‿◕

Post a Comment