I made a program to delete duplicates in an array but the program\'s if condition always remain true. I understood what the problem was,changed arr[i] to arr[count] and allocate
You never initialized arr. Currently it's just a pointer, it has no actual bound on it, so you could be overwriting something else.
Also, you're never incrementing scanf("%d",&arr[i]); I think you want that to read scanf("%d",&arr[counter]);