Check following threads-
 
http://stackoverflow.com/questions/20501982/using-a-function-to-remove-duplicates-form-an-array-in-c
 
http://stackoverflow.com/questions/1532819/algorithm-efficient-way-to-remove-duplicate-integers-from-an-array
 
Hope, it helps :)