Remove Duplicates
C
Hard
1 views
Problem Description
Remove duplicate characters from a string. Each character must appear only once in the resulting string. Maintain order.
Official Solution
#include <stdio.h>
int main() {
char str[200];
int seen[256] = {0};
int i, index = 0;
printf("Enter a string: ");
fgets(str, sizeof(str), stdin);
for (i = 0; str[i] != '