fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int A[3] = { 10, 20, 30 };
  7. int B[3] = { 100, 200, 300 };
  8. cout << A << endl;
  9. cout << B << endl;
  10. cout << &A << endl;
  11. cout << &B << endl;
  12. int* ptr = A;
  13. cout << ptr << endl;
  14. cout << &ptr << endl;
  15. // A = B;
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5476KB
stdin
Standard input is empty
stdout
0x7ffdf44717f0
0x7ffdf44717fc
0x7ffdf44717f0
0x7ffdf44717fc
0x7ffdf44717f0
0x7ffdf44717e8