Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created November 21, 2020 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/e02210c08484a1fe4d4ee7507e26e895 to your computer and use it in GitHub Desktop.
Save amankharwal/e02210c08484a1fe4d4ee7507e26e895 to your computer and use it in GitHub Desktop.
#include<iostream>
#include<string>
using namespace std;
int main(){
string small, large;
small = "I am short";
large = "I am a very long string";
cout<<"The small string is "<<small.length()<<" characters."<<endl;
cout<<"The long string is "<<large.length()<<" characters."<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment