fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string s = "happy string";
  7. s = "sad string";
  8. s = "both";
  9. cout << s.size();
  10. return 0;
  11. }
Success #stdin #stdout 0.01s 5284KB
stdin
1
stdout
4