fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. char *ptr = "hello world";
  6. cout << ptr << endl;
  7. cout << ptr[0] << endl;
  8. cout << &ptr;
  9. return 0;
  10. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
hello world
h
0x7ffeb193d8b0