#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,a[100],p;
clrscr();
printf("How many numbers, you input in array : ");
scanf("%d",&n);
for(i=0;i<n;i++)
{
printf("\na[%d] = ",i+1);
scanf("%d",&a[i]);
}
printf("\nEnter any position to insert : ");
scanf("%d",&p);
if(p<0 || p>n)
printf("\nInsert is not possible, please give value greater than 0 & less than %d ",n);
else
{
p=p-1;
for(i=n-1;i>=p;i--)
a[i+1]=a[i];
printf("\nEnter any number to insert : ");
scanf("%d",&a[p]);
n++;
}
printf("\nAfter insert, Array contains : ");
for(i=0;i<n;i++)
printf("\n\na[%d] = %4d",i+1,a[i]);
getch();
}
///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........