C Program to delete data from an array from a particular position:
#include<stdio.h>
void main ()
{
int array[10], n elem ,pos;
// Reading an array
printf(“Enter size of an array”);
scanf ("%d", &n);
printf(“Enter array elements”);
for (i=0;i<n;i++)
scanf ("%d", &array[i]);
//deleting an element at specified position
printf(“Enter position from where to delete the element”);
scanf ("%d", &pos);
pos--;
for (i=pos ; i<n ;i++)
a[i]= a[i+1];
n--;
// writing an array
printf(“array elements are”);
for (i=0;i<n;i++)
printf ("%d", array[i]);
}
C Program to delete data from an array from a particular position: