fork download
  1. #include <iostream>
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int a[] = {1, 2, 3, 4, 5};
  8. int b[5] = 0;
  9. for(int i = 0;i < (*(&a+1)-a); i++){
  10. cout<<a[i]<<" ";
  11. }
  12. return 0;
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:13: error: array must be initialized with a brace-enclosed initializer
  int b[5] = 0;
             ^
stdout
Standard output is empty