fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. const char* str = "Hello World";
  5. unsigned len = 0;
  6. while(*str++) ++len;
  7. std::cout << "The length of the string is: " << len;
  8. }
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
The length of the string is: 11