#include<stdio.h>
#include<conio.h>
void main()
{
int a[10]={1,2,3,4,5};
int n;
printf("\nAt present elements of array are");
for(int i=0;i<=4;i++)
{
printf("\n%d",a[i]);
}
printf("\nEnter the element you want to insert");
scanf("%d",&n);
a[i]=n;
printf("\n New array after insertion is");
for(i=0;i<=5;i++)
{
printf("\n%d",a[i]);
}
getch();
}
#include<conio.h>
void main()
{
int a[10]={1,2,3,4,5};
int n;
printf("\nAt present elements of array are");
for(int i=0;i<=4;i++)
{
printf("\n%d",a[i]);
}
printf("\nEnter the element you want to insert");
scanf("%d",&n);
a[i]=n;
printf("\n New array after insertion is");
for(i=0;i<=5;i++)
{
printf("\n%d",a[i]);
}
getch();
}