View the step-by-step solution to:

c program creat c code that reads a string with a maximum length of 30 from the keyboard.

c program

creat c code that reads a string with a maximum length of 30 from the keyboard. The code should then copy the characters from that string into a second character array in order but only if the character is a vowel (a, e, i, o, u). Once copied, the code should output these values in order. The code should then count and display the number of times each vowel appears in the array. Finally, the code should also output the index in the second array where each vowel first appeared or a suitable message if a particular vowel is not in the array at all.



hints:

getVowels()

       ?=getString(?) //use fgets(?)

       ?=copyString(?)

       

printVowelArray(?)


printStatistics(?)

       printStatsForVowel(  , , 'a')      

       printStatsForVowel(  , , 'e')

    ......and so on


loop

if char='a','e','i','o','u' then

copy char to new array

end if

end loop

return length of new array

Top Answer

Output: Enter a line of string: welcome to this program e appeared in index: 1... View the full answer

Capture.PNG

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online