fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. char *str = "hello world";
  6. int i = 0;
  7. while( *str )
  8. {
  9. i++;
  10. str++;
  11. }
  12. std::cout << sizeof(char) * i;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
11