This code has a number of things wrong with it.
1) while (s[j] != '0')
I'm fairly sure you want to be checking for the NUL character, not the character constant zero. Change '0' to '\0'
2) j++
you are incrementing j before you even look at the 0th index of your array. If you had a vowel at s[0], this would be missed. Move j++ to the very bottom of the while loop, just before the ending brace.
3) s[j] = 'a'
You are using the assignment operator = here when you should be using the equality operator == instead. Using the assignment operator is legal C code and thus will compile. Unfortunately it will return true and you'll end up replacing all of your characters with asterisks
4) putchar(j);
You are attempting to output 'j' (your iterator) when you really want to be outputting s[j] (your character).
5) return 0
just like in #2, your return statement is in the wrong place. You have it within the while loop when it should be outside of it. The way you have it written, the while loop will only execute the first iteration before your function goes out of scope.
int star_vowels(char s[]) {
int j = 0;
while (s[j] != '\0'){
if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' || s[j] == 'u') {
putchar('*');
} else {
putchar(s[j]);
}
j++;
}
return 0;
}