Input
Output
#include <stdio.h> void main() { int a[24]={5, 6, 8, 9},i,n=4,position=3,value=7; //clrscr(); printf("Enter number of elements: "); printf("%d\n",n); printf("Enter the integer: "); for(i=0; i<n; i++) { printf("%d ",a[i]); } printf("\nEnter the location and value of an array: "); printf("%d %d\n", position,value); for (i = n - 1; i >= position - 1; i--) { a[i+1] = a[i]; } a[position-1] = value; for(i=0; i<=n; i++) { printf("%d ",a[i]); } //getch(); }