Originally Posted by
laserlight
Hmm... what is this thing about minimum/maximum digits? Your function should return the length of the reduced range, right? The caller is then responsible for working with the reduced range. Trying to set the "removed" part of the original array/range to some designated garbage value is unnecessary.
Incidentally, if you ever use C++ instead of C, check out the C++ standard library's std::unique generic algorithm for something along the lines of what you are supposed to do here.
EDIT:
ARGH! Looking at your post #31, you're writing a function that does too much. Let the compact function compact the array to a reduced range and return the length of the reduced range. It should not print anything at all.