Input
Output
#include <iostream> using namespace std; int main() { int a[24] = {5, 7, 8, 9},i,n = 4,position = 3; cout << "Enter the number of elements: "; cout << n << endl; cout << "Enter the integer: "; for(i=0; i<n; i++) { cout << a[i] << " "; } cout << "\nEnter the delete position of an element in an array: "; cout << position; if (position < n+1) { for (i = position - 1; i < n - 1; i++) { a[i] = a[i+1]; } cout << "\nAfter deleted array of an elements: "; for (i = 0; i < n - 1; i++) cout << a[i] << " "; } else { cout << "\nArray of element deletion is not possible."; } return 0; }