code :
#include<stdio.h>
#include<stdlib.h>
int main()
{
system(“clear”);
int n,el,j,i,flag=0;
printf(“Enter Max Size\n”);
scanf(“%d”,&n);
int a[n];
printf(“Enter Element\n”);
for(i=0;i<n;i++)
{
scanf(“%d”,&a[i]);
}
printf(“Enter Element U Want To Delete\n”);
scanf(“%d”,&el);
for(i=0;i<n;i++)
{
if(a[i]==el)
{
flag=1;
for(j=i;j<n;j++)
{
a[j]=a[j+1];
}
}
}
if(flag == 0)
{
printf(“Element Not found\n”);
}
printf(“New Array Created Is \n”);
for(i=0;i<n;i++)
{
printf(“Array[%d]=%d\n”,i,a[i]);
}
}