Are you required to use this approach? Another approach would be to send the char array by reference. You could build a temporary character string and add the characters from the original that aren't vowels and then reset the parameter to the new array.