1)If you don't want to use x any further hen don't use it as array
2)why use f,g,k,p,h???You know 1,2,3 etc and can directly use it.
3)@coder777 I think he need to end file reading if non-vovel is encounered.
But if so then also jaytee use do...while or simply initialise xas any vovel.(considering that you are not using it as array and wasting memory.