Solution in Java and C
Code
# Code
```java []
class Solution {
    boolean isVowel(char x) {
        return x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u' ||
                x == 'A' || x == 'E' || x == 'I' || x == 'O' || x == 'U';
    }

    public String sortVowels(String s) {
        int len = s.length();
        List<Character> vowel = new ArrayList<>();
        StringBuilder sb = new StringBuilder(s);
        
        for (int i = 0; i < len; i++) {
            if (isVowel(sb.charAt(i))) {
                vowel.add(sb.charAt(i));
                sb.setCharAt(i, '#');
            }
        }

        Collections.sort(vowel);

        for (int i = 0, index = 0; i < len; i++) {
            if (sb.charAt(i) == '#') {
                sb.setCharAt(i, vowel.get(index++));
            }
        }

        return new String(sb);
    }
}
```
```c []
bool isVowel(char x) {
    return x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u' ||
           x == 'A' || x == 'E' || x == 'I' || x == 'O' || x == 'U';
}

char* sortVowels(char* s) {
    int len = strlen(s);
    char* vowel = malloc(len * sizeof(char));
    int index = 0;
    for (int i = 0; i < len; i++) {
        if (isVowel(s[i])) {
            vowel[index++] = s[i];
            s[i] = '#';
        }
    }

    int cmp(const void* a, const void* b) { return *(char*)a - *(char*)b; }
    qsort(vowel, index, sizeof(char), cmp);

    for (int i = 0, index = 0; i < len; i++) {
        if (s[i] == '#') {
            s[i] = vowel[index++];
        }
    }

    free(vowel);
    return s;
}
```
['String', 'C', 'Sorting', 'Java']