1for (int i = 0; i < arr.size(); ++i){
2//use if we explicitly need the value of i
3cout << i << ":\t" << arr[i] << endl;
4}
5for (int element : arr){
6//modifying element will not affect the array
7cout << element << endl;
8}
9for (int &element : arr){
10//modifying element will affect the array
11cout << element << endl;
12}