main()
{
int a[50],i,pos,size;
clrscr();
printf("\nEnter size of An array: ");
scanf("%d",&size);
printf("\nEnter %d elements in to An array: ",size);
for(i=0;i<=size;i++)
scanf("%d",&a[i]);
printf("\n Enter the position which is to be delete : ");
scanf("%d",&pos);
i=0;
while(i!=pos-1)
i++;
while(i<=10)
{
a[i]=a[i+1];
i++;
}
size--;
for(i=0;i<=size;i++)
printf(" %d",a[i]);
getch();
}
No comments:
Post a Comment