fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. int A[3] = { 100, 200, 300 };
  7. cout << A << endl;
  8. for (int i = 0; i < 3; i++) {
  9. // cout << A[i] << " ";
  10. cout << *(A + i) << endl;
  11. }
  12. cout << endl;
  13. int B[3] = { 1000, 2000, 3000 };
  14. A = B;
  15.  
  16. return 0;
  17. }
Compilation error #stdin compilation error #stdout 0.01s 5292KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:14:6: error: invalid array assignment
  A = B;
      ^
stdout
Standard output is empty