1#include<iostream>
2#include<bits/stdc++.h>
3using namespace std;
4int main(){
5 int arr[3] = {0,1,2};
6 cout << "Before update "<<arr[2]<<endl;
7 arr[2]=1;//updating element
8 cout <<"After update "<<arr[2]<<endl;
9}
10
11/*output:-
12Before update 2
13After update 1*/