#include #include #include #include using namespace std; int main() { //Define an initializer list of 3 elements 100 200 300 //Try changing the first element using the //iterator notation //Print the list using the range based loop initializer_list i1{100, 200, 300 } ; initializer_list::iterator iter1 = i1.begin() ; // *iter1 = 100 ; for( int x1 : i1 ) cout << x1 << " " ; cout << endl ; //Define a std::array of 3 elements 100 200 300 //Try changing the first element using the //iterator notation //Print the array using the range based loop array arr1 = { 100, 200, 300 } ; array::iterator iter2 = arr1.begin() ; *iter2 = 101 ; for( int x1 : arr1 ) cout << x1 << " " ; cout << endl ; return 0; }