Nagravision interview question

count and remove duplicate items in a char array