fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int arr[] = {1,2,3};
  6.  
  7. for(auto i : arr){
  8. cout << i << endl;
  9. }
  10.  
  11. for(auto it = begin(arr);it != end(arr); it++){
  12. cout << *it << endl;
  13. }
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 3096KB
stdin
Standard input is empty
stdout
1
2
3
1
2
3