fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. std::string s("hello");
  7. bool r = s[s.size()] == '\0'; // True
  8. bool ptr = &s[0] == s.c_str(); // Tru
  9. return 0;
  10. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
Standard output is empty