fork download
  1. #include <iostream>
  2.  
  3. int main() {
  4. int x[10]{1, 2, 3, 4, 5, 6};
  5. int y[8]{2, 4, 8, 16, 32, 64, 128};
  6.  
  7. x = y;
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:7:6: error: incompatible types in assignment of ‘int [8]’ to ‘int [10]’
  x = y;
      ^
stdout
Standard output is empty