fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. int *a = new int(1);
  5. std::cout << "a: " << a << " " << *a << " " << &a << std::endl;
  6. int *b = new int[10];
  7. b[0] = 2;
  8. b[1] = 3;
  9. std::cout << "b: " << b << " " << *b << " " << &b << std::endl;
  10. delete a;
  11. delete[] b;
  12. return 0;
  13. }
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout
a: 0x2b5db7398c20 1 0x7ffe0e642f50
b: 0x2b5db7399c50 2 0x7ffe0e642f58