the problem is that, the function is only replacing the number that I want to delete with th number after it, but everything remains the same after.
e.g.
it is showing me
1 2 3 5 5 6 7 8 9 10
#include <stdio.h>
int rem(int a[],int pLen,int pos)
{
int count;
for (count = pos;count < pLen;count++)
{
a[count] = a[count+1];
return a[count];
}
}
main()
{
int arr[10] = {1,2,3,4,5,6,7,8,9,10};
int count2;
rem(arr,10,3);
for (count2 = 0;count2 <= 9;count2++)
{
printf(" %d ",arr[count2]);
}
getch();
}