So this program is suppose to delete an element which has a duplicate and so far it only deleted only two pairs. I need help.
#include <stdio.h>
int main(void)
{
int arr[11] = { 1, 1, 2, 3, 4, 5, 4, 7, 8, 9, 8 };
int col[11];
int i;
int j;
int k;
int ctr = 0;
for (i = 0; i < 11; i++)
{
for (j = i + 1; j < 10; j++)
{
if (arr[i] == arr[j])
{
i++;
}
}
printf("%d", arr[i]);
}
getch();
return 0;
}