i was wondering how i might be able to empty out the first 5 elements of an array with 10 things in it?
thank you
Printable View
i was wondering how i might be able to empty out the first 5 elements of an array with 10 things in it?
thank you
will copy the next 5 elements to the first five.Code:int a[10];
int i;
for(i=0;i<5;i++)
a[i]=a[i+5];
In this type of situation.where you have to remove the first elements you can implement a queue also.