Computer Science, asked by sandhya51170, 1 year ago

Write a c++ program to delete elements in an array.​

Answers

Answered by hatimlaila23
0

Answer:

int array[100], position, c, n;

#include <stdio.h>

scanf("%d", &n);

for (c = 0; c < n; c++)

Hope it helps!!

Please mark as brainliest dear!!!

Answered by Anonymous
0

void Delete(int a[],int n,int item)

{

int i,POS=0;

for(i=0;i<n;i++)

{

if(a[i]==item)

{

POS=i;

}

if(POS==0)

{

cout<<"not found";

}

else

{

for(i=POS;i<n;i++)

{

a[i]=a[i+1];

}

a[n-1]=0;

}

}

Similar questions