Input
Output
#include <iostream> using namespace std; int main() { int a[24]={5, 6, 8, 9},i, n = 4,position = 3,value = 7; cout << "Enter number of elements: "; cout << n << endl; cout << "Enter the integer: "; for(i=0; i<n; i++) { cout << a[i] << " "; } cout << "\nEnter the location and value of an array: "; cout << position <<" "<< value << endl; for (i = n - 1; i >= position - 1; i--) { a[i+1] = a[i]; } a[position-1] = value; for(i=0; i<=n; i++) { cout << a[i] << " "; } return 0; }