void Uniq(char* str) { int first = 0; int result = first; while (first < strlen(str)) { if (!(str[result] == str[++first])) { str[++result] = str[first]; } } }