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. for(int i = 0;i < (*(&a+1)-a); i++){
  9. cout<<a[i]<<" ";
  10. }
  11. return 0;
  12. }
Success #stdin #stdout 0s 4368KB
stdin
Standard input is empty
stdout
1 2 3 4 5