Check these codes plzz
#include <iostream> using namespace std; int main(){ int arr[7] = {43,13,4,57,98,156}; int sum=0,indexPos=1; for(int x=0;x<6;x++){ sum += arr[x]; } cout <<"Sum of all elements : "<<sum<<endl; for(int x=5;x>=1;x--){ arr[x+1] = arr[x]; } cout<<"\nAfter insertion\n"; arr[1] = 73; for(int x=0;x<7;x++){ cout<<arr[x]<<" "; } sum = 0; for(int x=0;x<7;x++){ sum += arr[x]; } cout <<"\n\nSum of all elements After insertion : "<<sum<<endl; cout<<"\nDelete 13 from list:\n"; for(int x=2;x<6;x++){ arr[x] = arr[x+1]; } arr[6]=0; cout<<"After Deletion\n"; arr[1] = 73; for(int x=0;x<6;x++){ cout<<arr[x]<<" "; } sum = 0; for(int x=0;x<6;x++){ sum += arr[x]; } cout <<"\n\nSum of all elements After insertion : "<<sum<<endl; cout<<"\nAfter Update\n"; arr[3] = 84; for(int x=0;x<6;x++){ cout<<arr[x]<<" "; } }